X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ada1ff0dbcd973c0a4630318599eb469dd6e3fb6..cbeda384e51acb82e13994cb67ac1714669cae10:/include/wx/docview.h?ds=inline diff --git a/include/wx/docview.h b/include/wx/docview.h index 610dd0c6f6..55fa2c7920 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -530,6 +530,14 @@ public: view->SetDocChildFrame(this); } + ~wxDocChildFrameAnyBase() + { + // prevent the view from deleting us if we're being deleted directly + // (and not via Close() + Destroy()) + if ( m_childView ) + m_childView->SetDocChildFrame(NULL); + } + wxDocument *GetDocument() const { return m_childDocument; } wxView *GetView() const { return m_childView; } void SetDocument(wxDocument *doc) { m_childDocument = doc; }