Debugger: Fix debugger command line startup.

Protect against session changes at startup.
Reviewed-by: hjk
This commit is contained in:
Friedemann Kleint
2010-03-11 08:44:07 +01:00
parent cfbd84639d
commit b15853e3ea

View File

@@ -1239,8 +1239,12 @@ void DebuggerManager::sessionLoaded()
void DebuggerManager::aboutToUnloadSession()
{
if (d->m_engine)
d->m_engine->shutdown();
// Stop debugging the active project when switching sessions.
// Note that at startup, session switches may occur, which interfer
// with command-line debugging startup.
if (d->m_engine && state() != DebuggerNotReady
&& d->m_startParameters->startMode == StartInternal)
d->m_engine->shutdown();
}
void DebuggerManager::aboutToSaveSession()