attempt at crash fix

This commit is contained in:
Jeremy Bullock 2020-04-08 22:27:30 -06:00
parent 8a244e10c8
commit e2e5cf4dae
2 changed files with 6 additions and 7 deletions

View file

@ -354,12 +354,6 @@ StopMotion::StopMotion() {
m_filePath = scene->getDefaultLevelPath(OVL_TYPE, m_levelName.toStdWString())
.getParentDir()
.getQString();
// set handler for a camera detected
initializeCanonSDK();
if (!m_error)
m_error = EdsSetCameraAddedHandler(StopMotion::handleCameraAddedEvent,
(EdsVoid *)this);
}
//-----------------------------------------------------------------
@ -2762,6 +2756,9 @@ EdsError StopMotion::initializeCanonSDK() {
if (m_error == EDS_ERR_OK) {
m_isSDKLoaded = true;
}
if (!m_error)
m_error = EdsSetCameraAddedHandler(StopMotion::handleCameraAddedEvent,
(EdsVoid *)this);
return m_error;
}

View file

@ -1599,7 +1599,9 @@ void StopMotionController::onFocusFar3() { m_stopMotion->focusFar3(); }
//-----------------------------------------------------------------------------
void StopMotionController::showEvent(QShowEvent *event) {}
void StopMotionController::showEvent(QShowEvent *event) {
m_stopMotion->initializeCanonSDK();
}
//-----------------------------------------------------------------------------