]> git.saurik.com Git - wxWidgets.git/commitdiff
Safer access of member variables
authorJulian Smart <julian@anthemion.co.uk>
Mon, 7 Dec 2009 15:05:28 +0000 (15:05 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 7 Dec 2009 15:05:28 +0000 (15:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/docview.cpp

index 9e5e65a0154bd287ceb5aa0abe4849db984ee517..f0ed6c59bf24dee3c61199498e7e07ca51196c6e 100644 (file)
@@ -651,7 +651,8 @@ wxView::wxView()
 
 wxView::~wxView()
 {
-    GetDocumentManager()->ActivateView(this, false);
+    if (GetDocumentManager())
+        GetDocumentManager()->ActivateView(this, false);
 
     // reset our frame view first, before removing it from the document as
     // SetView(NULL) is a simple call while RemoveView() may result in user