Fix crashing on exit with floating level strip

This commit is contained in:
manongjohn 2021-02-24 00:22:48 -05:00
parent 588c760e8a
commit f3c820f2bf

View file

@ -488,9 +488,8 @@ void FilmstripFrames::hideEvent(QHideEvent *) {
// if the level strip is floating during shutting down Tahoma2D // if the level strip is floating during shutting down Tahoma2D
// it can cause a crash disconnecting from the viewer which was already // it can cause a crash disconnecting from the viewer which was already
// destroyed. Checking the fps is a janky way to ensure the viewer is // destroyed.
// stil relevant. if (m_viewer && m_viewer->isValid()) {
if (m_viewer && m_viewer->getFPS() > -100) {
disconnect(m_viewer, SIGNAL(onZoomChanged()), this, SLOT(update())); disconnect(m_viewer, SIGNAL(onZoomChanged()), this, SLOT(update()));
disconnect(m_viewer, SIGNAL(refreshNavi()), this, SLOT(update())); disconnect(m_viewer, SIGNAL(refreshNavi()), this, SLOT(update()));
m_viewer = nullptr; m_viewer = nullptr;