Attempt to fix crash on MAC when closing using Command+Q

This commit is contained in:
Enrico Turri 2020-03-04 15:19:48 +01:00
parent 1bff1f7460
commit dcf3565426
4 changed files with 47 additions and 2 deletions

View file

@ -51,7 +51,9 @@ View3D::~View3D()
#if ENABLE_NON_STATIC_CANVAS_MANAGER
if (m_canvas != nullptr)
{
m_canvas->unbind_event_handlers();
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// m_canvas->unbind_event_handlers();
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
delete m_canvas;
}
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
@ -379,7 +381,9 @@ Preview::~Preview()
#if ENABLE_NON_STATIC_CANVAS_MANAGER
if (m_canvas != nullptr)
{
m_canvas->unbind_event_handlers();
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// m_canvas->unbind_event_handlers();
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
delete m_canvas;
}
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER