Ensure event callback removed when quitting

This commit is contained in:
Jack Andersen 2017-11-16 22:57:06 -10:00
parent a161fb28d9
commit 5fc5b6b0e1
2 changed files with 6 additions and 0 deletions

View File

@ -113,6 +113,7 @@ class RootView : public View
public:
RootView(IViewManager& viewMan, ViewResources& res, boo::IWindow* window);
~RootView();
void destroyed();
bool isDestroyed() const {return m_destroyed;}

View File

@ -22,6 +22,11 @@ RootView::RootView(IViewManager& viewMan, ViewResources& res, boo::IWindow* wind
resized(rect, rect);
}
RootView::~RootView()
{
m_window->setCallback(nullptr);
}
RootView::SplitMenuSystem::SplitMenuSystem(RootView& rv, boo::IGraphicsDataFactory::Context& ctx)
: m_rv(rv), m_text(rv.m_viewMan.translateOr("boundary_action", "Boundary Action")),
m_splitActionNode(*this), m_joinActionNode(*this)