From 63c639ec627b627cd8d96583d6e7c9d691d485ed Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 7 Dec 2009 15:05:28 +0000 Subject: [PATCH] Safer access of member variables git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/docview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 9e5e65a015..f0ed6c59bf 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -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 -- 2.45.2