Commit 61e7ffc9 authored by dt's avatar dt
Browse files

toolChain() might return a null pointer

Don't crash then
parent 6f675c28
......@@ -122,7 +122,6 @@ void ProjectLoadWizard::addBuildConfiguration(QString name, QtVersion *qtversion
m_project->setQtVersion(name, 0);
else
m_project->setQtVersion(name, qtversion->uniqueId());
}
void ProjectLoadWizard::done(int result)
......
......@@ -400,12 +400,14 @@ ProjectExplorer::ToolChain *Qt4Project::toolChain(const QString &buildConfigurat
QString Qt4Project::makeCommand(const QString &buildConfiguration) const
{
return toolChain(buildConfiguration)->makeCommand();
ToolChain *tc = toolChain(buildConfiguration);
return tc ? tc->makeCommand() : "make";
}
QString Qt4Project::defaultMakeTarget(const QString &buildConfiguration) const
{
return toolChain(buildConfiguration)->defaultMakeTarget();
ToolChain *tc = toolChain(buildConfiguration);
return tc ? toolChain(buildConfiguration)->defaultMakeTarget() : "";
}
void Qt4Project::updateCodeModel()
......@@ -740,7 +742,9 @@ ProjectExplorer::Environment Qt4Project::baseEnvironment(const QString &buildCon
{
Environment env = useSystemEnvironment(buildConfiguration) ? Environment::systemEnvironment() : Environment();
qtVersion(buildConfiguration)->addToEnvironment(env);
toolChain(buildConfiguration)->addToEnvironment(env);
ToolChain *tc = toolChain(buildConfiguration);
if (tc)
tc->addToEnvironment(env);
return env;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment