diff --git a/src/common/docview.cpp b/src/common/docview.cpp index f0ed6c59bf..6e1ef4c162 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -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