# HG changeset patch # User Chris Cannam # Date 1409742515 -3600 # Node ID ee36642b9b592057d64653d6587f54484f6b597d # Parent 57efeb75880d8cb0c43df97c7cf28954b270eb6f Fix a couple of not-very-realistic potential null-pointer derefs (from coverity scan) diff -r 57efeb75880d -r ee36642b9b59 view/View.cpp --- a/view/View.cpp Wed Sep 03 12:05:45 2014 +0100 +++ b/view/View.cpp Wed Sep 03 12:08:35 2014 +0100 @@ -1312,7 +1312,7 @@ int View::alignFromReference(int f) const { - if (!m_manager->getAlignMode()) return f; + if (!m_manager || !m_manager->getAlignMode()) return f; Model *aligningModel = getAligningModel(); if (!aligningModel) return f; return aligningModel->alignFromReference(f); @@ -1330,6 +1330,7 @@ int View::getAlignedPlaybackFrame() const { + if (!m_manager) return 0; int pf = m_manager->getPlaybackFrame(); if (!m_manager->getAlignMode()) return pf;