diff view/View.cpp @ 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 532302d04571
children e0f08e108064
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;