Fix segfault on Linux closing the app

This commit is contained in:
David Capello 2018-05-30 18:20:31 -03:00
parent 96ca735ed5
commit 89c3819784

View File

@ -63,8 +63,7 @@ public:
}
~Painter() {
if (m_canvas)
m_canvas->dispose();
ASSERT(!m_canvas);
}
void addRef() {
@ -90,6 +89,10 @@ public:
}
m_paintingThread.join();
if (m_canvas) {
m_canvas->dispose();
m_canvas = nullptr;
}
}
}