Debugger: Validate pointer *before* using it

Change-Id: I8bf80fcdd51b5db8e7c65adba551ca667912cd86
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Orgad Shaneh
2014-05-05 17:09:04 +03:00
committed by hjk
parent 753215e297
commit 60ccb2a425

View File

@@ -88,11 +88,11 @@ QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp, QString *errorMess
d = new QmlCppEnginePrivate;
d->m_qmlEngine = new QmlEngine(sp, this);
d->m_cppEngine = DebuggerRunControlFactory::createEngine(sp.firstSlaveEngineType, sp, errorMessage);
d->m_cppEngine->setMasterEngine(this);
if (!d->m_cppEngine) {
*errorMessage = tr("The slave debugging engine required for combined QML/C++-Debugging could not be created: %1").arg(*errorMessage);
return;
}
d->m_cppEngine->setMasterEngine(this);
setActiveEngine(d->m_cppEngine);
}