]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
don't assume there's always an active wxEventLoop instance
[wxWidgets.git] / src / common / docview.cpp
index ea677c4487c544268eb3ea3cb679545d96272fd8..a72517a65b0a3f36c8f4cfcaab1eecea758e13f7 100644 (file)
@@ -273,7 +273,7 @@ bool wxDocument::SaveAs()
 
     if (docTemplate->GetViewClassInfo() && docTemplate->GetDocClassInfo())
     {
 
     if (docTemplate->GetViewClassInfo() && docTemplate->GetDocClassInfo())
     {
-        wxList::compatibility_iterator node = wxDocManager::GetDocumentManager()->GetTemplates().GetFirst();
+        wxList::compatibility_iterator node = docTemplate->GetDocumentManager()->GetTemplates().GetFirst();
         while (node)
         {
             wxDocTemplate *t = (wxDocTemplate*) node->GetData();
         while (node)
         {
             wxDocTemplate *t = (wxDocTemplate*) node->GetData();