aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerplugin.cpp
diff options
context:
space:
mode:
authorTobias Hunger <[email protected]>2012-08-08 15:39:10 +0200
committerTobias Hunger <[email protected]>2012-08-13 14:22:46 +0200
commitcac28198382a97f873594ea77d17e90da79537f6 (patch)
treee6214cd18857d3011da43044082ec78e7249a918 /src/plugins/debugger/debuggerplugin.cpp
parent240e6a8ae50705d1bde29ec2ad2606192bbd8547 (diff)
Fix crashes when no default profile is set
* Handle 0 when calling createTarget to avoid the crashes in the first place * Do not try to create/add targets for 0 profiles to avoid creator writing a warning to the console * Fix possible crashes in debugger when no default profile is set. Task-number: QTCREATORBUG-7695 Change-Id: I9afc8e29c8b859ad078dad794ef5017168daac78 Reviewed-by: Orgad Shaneh <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 6cb43e7ebc3..9e92e768189 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1317,7 +1317,8 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
return false;
}
DebuggerStartParameters sp;
- fillParameters(&sp, ProfileManager::instance()->defaultProfile()->id());
+ Profile *defaultProfile = ProfileManager::instance()->defaultProfile();
+ fillParameters(&sp, defaultProfile ? defaultProfile->id() : Core::Id());
qulonglong pid = it->toULongLong();
if (pid) {
sp.startMode = AttachExternal;