From f3c820f2bf4ed8942aceeb2fc255b23346481713 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Wed, 24 Feb 2021 00:22:48 -0500 Subject: [PATCH] Fix crashing on exit with floating level strip --- toonz/sources/toonz/filmstrip.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/toonz/sources/toonz/filmstrip.cpp b/toonz/sources/toonz/filmstrip.cpp index 57e16c86..37f06dde 100644 --- a/toonz/sources/toonz/filmstrip.cpp +++ b/toonz/sources/toonz/filmstrip.cpp @@ -488,9 +488,8 @@ void FilmstripFrames::hideEvent(QHideEvent *) { // if the level strip is floating during shutting down Tahoma2D // 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 - // stil relevant. - if (m_viewer && m_viewer->getFPS() > -100) { + // destroyed. + if (m_viewer && m_viewer->isValid()) { disconnect(m_viewer, SIGNAL(onZoomChanged()), this, SLOT(update())); disconnect(m_viewer, SIGNAL(refreshNavi()), this, SLOT(update())); m_viewer = nullptr;