]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't crash if no document
authorJulian Smart <julian@anthemion.co.uk>
Mon, 7 Dec 2009 15:23:09 +0000 (15:23 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 7 Dec 2009 15:23:09 +0000 (15:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/docview.cpp

index f0ed6c59bf24dee3c61199498e7e07ca51196c6e..6e1ef4c162a87ba5abb2062a4ec9ba1c0fcf1cd3 100644 (file)
@@ -651,7 +651,7 @@ wxView::wxView()
 
 wxView::~wxView()
 {
-    if (GetDocumentManager())
+    if (m_viewDocument && GetDocumentManager())
         GetDocumentManager()->ActivateView(this, false);
 
     // reset our frame view first, before removing it from the document as