X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd4618549b4cb22d84930b45853dc09f489e732c..ccc3a25d878ae0797c2f689f5ef6a8b727786f83:/src/common/docview.cpp diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 9e5e65a015..6e1ef4c162 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -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