forked from qt-creator/qt-creator
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:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user