comparison 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
comparison
equal deleted inserted replaced
855:57efeb75880d 856:ee36642b9b59
1310 } 1310 }
1311 1311
1312 int 1312 int
1313 View::alignFromReference(int f) const 1313 View::alignFromReference(int f) const
1314 { 1314 {
1315 if (!m_manager->getAlignMode()) return f; 1315 if (!m_manager || !m_manager->getAlignMode()) return f;
1316 Model *aligningModel = getAligningModel(); 1316 Model *aligningModel = getAligningModel();
1317 if (!aligningModel) return f; 1317 if (!aligningModel) return f;
1318 return aligningModel->alignFromReference(f); 1318 return aligningModel->alignFromReference(f);
1319 } 1319 }
1320 1320
1328 } 1328 }
1329 1329
1330 int 1330 int
1331 View::getAlignedPlaybackFrame() const 1331 View::getAlignedPlaybackFrame() const
1332 { 1332 {
1333 if (!m_manager) return 0;
1333 int pf = m_manager->getPlaybackFrame(); 1334 int pf = m_manager->getPlaybackFrame();
1334 if (!m_manager->getAlignMode()) return pf; 1335 if (!m_manager->getAlignMode()) return pf;
1335 1336
1336 Model *aligningModel = getAligningModel(); 1337 Model *aligningModel = getAligningModel();
1337 if (!aligningModel) return pf; 1338 if (!aligningModel) return pf;