X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/704e631016631ac788a93423322d06e4cae9bbf5..396f85bac581a56e4c497b83c4602aa3746bbfd3:/src/aui/floatpane.cpp diff --git a/src/aui/floatpane.cpp b/src/aui/floatpane.cpp index f98693a9d1..ab81810d61 100644 --- a/src/aui/floatpane.cpp +++ b/src/aui/floatpane.cpp @@ -73,9 +73,11 @@ wxAuiFloatingFrame::wxAuiFloatingFrame(wxWindow* parent, wxAuiFloatingFrame::~wxAuiFloatingFrame() { // if we do not do this, then we can crash... - if (m_owner_mgr && m_owner_mgr->m_action_window == this) + if(m_owner_mgr) { - m_owner_mgr->m_action_window = NULL; + if(m_owner_mgr->m_action_window == this) + m_owner_mgr->m_action_window = NULL; + m_owner_mgr->UnregisterFloatingFrame(this); } m_mgr.UnInit(); @@ -151,6 +153,11 @@ wxAuiManager* wxAuiFloatingFrame::GetOwnerManager() const return m_owner_mgr; } +void wxAuiFloatingFrame::SetOwnerManager(wxAuiManager* owner_mgr) +{ + // we want to allow for NULL here to avoid crashing in dtor + m_owner_mgr = owner_mgr; +} void wxAuiFloatingFrame::OnSize(wxSizeEvent& event) {