Mercurial > hg > svgui
changeset 856:ee36642b9b59
Fix a couple of not-very-realistic potential null-pointer derefs (from coverity scan)
author | Chris Cannam |
---|---|
date | Wed, 03 Sep 2014 12:08:35 +0100 |
parents | 57efeb75880d |
children | 44675ab217a3 |
files | view/View.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;