diff --git a/toonz/sources/toonz/filmstrip.cpp b/toonz/sources/toonz/filmstrip.cpp index 5c2824c..34ccd67 100644 --- a/toonz/sources/toonz/filmstrip.cpp +++ b/toonz/sources/toonz/filmstrip.cpp @@ -486,7 +486,11 @@ void FilmstripFrames::hideEvent(QHideEvent *) { // active viewer change disconnect(app, SIGNAL(activeViewerChanged()), this, SLOT(getViewer())); - if (m_viewer) { + // 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) { disconnect(m_viewer, SIGNAL(onZoomChanged()), this, SLOT(update())); disconnect(m_viewer, SIGNAL(refreshNavi()), this, SLOT(update())); m_viewer = nullptr; diff --git a/toonz/sources/toonz/frameheadgadget.cpp b/toonz/sources/toonz/frameheadgadget.cpp index ce59878..b0400da 100644 --- a/toonz/sources/toonz/frameheadgadget.cpp +++ b/toonz/sources/toonz/frameheadgadget.cpp @@ -600,6 +600,7 @@ void FilmstripFrameHeadGadget::drawShiftTraceMarker(QPainter &p) { //----------------------------------------------------------------------------- bool FilmstripFrameHeadGadget::eventFilter(QObject *obj, QEvent *e) { + if (e->type() != QEvent::MouseButtonPress && e->type() != QEvent::MouseButtonDblClick && e->type() != QEvent::MouseMove) return false; // shift & trace case if (CommandManager::instance()->getAction(MI_ShiftTrace)->isChecked()) return shiftTraceEventFilter(obj, e);