]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
Don't crash on malformed HTML in wxHTML font tag handler.
[wxWidgets.git] / src / common / docview.cpp
index e2ff18c915eb8c32a2ebc1b6490076f434dde366..86d1783490db08f66d384bde644ce2ca7aae9da0 100644 (file)
@@ -1894,6 +1894,20 @@ void wxDocManager::DisassociateTemplate(wxDocTemplate *temp)
     m_templates.DeleteObject(temp);
 }
 
+wxDocTemplate* wxDocManager::FindTemplate(const wxClassInfo* classinfo)
+{
+   for ( wxList::compatibility_iterator node = m_templates.GetFirst();
+         node;
+         node = node->GetNext() )
+   {
+      wxDocTemplate* t = wxStaticCast(node->GetData(), wxDocTemplate);
+      if ( t->GetDocClassInfo() == classinfo )
+         return t;
+   }
+
+   return NULL;
+}
+
 // Add and remove a document from the manager's list
 void wxDocManager::AddDocument(wxDocument *doc)
 {