]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
Remove unnecessary comparison of unsigned variable with 0.
[wxWidgets.git] / src / common / docview.cpp
index 9e5e65a0154bd287ceb5aa0abe4849db984ee517..6e1ef4c162a87ba5abb2062a4ec9ba1c0fcf1cd3 100644 (file)
@@ -651,7 +651,8 @@ wxView::wxView()
 
 wxView::~wxView()
 {
-    GetDocumentManager()->ActivateView(this, false);
+    if (m_viewDocument && 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