Commit b47d41c2 authored by dt's avatar dt
Browse files

Fix crash with no toolchain.

parent efa3fec6
......@@ -106,10 +106,10 @@ bool MakeStep::init(const QString &name)
// but for now this is the least invasive change
ProjectExplorer::ToolChain *toolchain = qt4project->toolChain(bc);
ProjectExplorer::ToolChain::ToolChainType t = ProjectExplorer::ToolChain::UNKNOWN;
ProjectExplorer::ToolChain::ToolChainType type = ProjectExplorer::ToolChain::UNKNOWN;
if (toolchain)
t = toolchain->type();
if (t != ProjectExplorer::ToolChain::MSVC && t != ProjectExplorer::ToolChain::WINCE) {
type = toolchain->type();
if (type != ProjectExplorer::ToolChain::MSVC && type != ProjectExplorer::ToolChain::WINCE) {
if (value(name, "makeCmd").toString().isEmpty())
args << "-w";
}
......@@ -117,8 +117,7 @@ bool MakeStep::init(const QString &name)
setEnabled(name, true);
setArguments(name, args);
ProjectExplorer::ToolChain::ToolChainType type = qt4project->toolChain(bc)->type();
if ( type == ProjectExplorer::ToolChain::MSVC || type == ProjectExplorer::ToolChain::WINCE)
if (type == ProjectExplorer::ToolChain::MSVC || type == ProjectExplorer::ToolChain::WINCE)
setBuildParser(ProjectExplorer::Constants::BUILD_PARSER_MSVC);
else
setBuildParser(ProjectExplorer::Constants::BUILD_PARSER_GCC);
......
Supports Markdown
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