ProfileChooser: make more robust in case of no configured profiles

Change-Id: I53945617cc616d2bfe4726b4e6e45cad7b400c44
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
hjk
2012-08-24 14:45:25 +02:00
parent d39fc8088c
commit 29ec32a531
4 changed files with 14 additions and 5 deletions

View File

@@ -37,6 +37,7 @@
#include <projectexplorer/toolchain.h>
#include <utils/environment.h>
#include <utils/qtcassert.h>
#include <QDir>
#include <QPair>
@@ -213,11 +214,12 @@ ProfileInformation::ItemList DebuggerProfileInformation::toUserOutput(Profile *p
FileName DebuggerProfileInformation::debuggerCommand(const Profile *p)
{
return FileName::fromString(p->value(Core::Id(DEBUGGER_INFORMATION)).toString());
return FileName::fromString(p ? p->value(Core::Id(DEBUGGER_INFORMATION)).toString() : QString());
}
void DebuggerProfileInformation::setDebuggerCommand(Profile *p, const FileName &command)
{
QTC_ASSERT(p, return);
p->setValue(Core::Id(DEBUGGER_INFORMATION), command.toString());
}