Skip to content
Snippets Groups Projects
Commit b47d41c2 authored by dt's avatar dt
Browse files

Fix crash with no toolchain.

parent efa3fec6
No related branches found
No related tags found
No related merge requests found
...@@ -106,10 +106,10 @@ bool MakeStep::init(const QString &name) ...@@ -106,10 +106,10 @@ bool MakeStep::init(const QString &name)
// but for now this is the least invasive change // but for now this is the least invasive change
ProjectExplorer::ToolChain *toolchain = qt4project->toolChain(bc); ProjectExplorer::ToolChain *toolchain = qt4project->toolChain(bc);
ProjectExplorer::ToolChain::ToolChainType t = ProjectExplorer::ToolChain::UNKNOWN; ProjectExplorer::ToolChain::ToolChainType type = ProjectExplorer::ToolChain::UNKNOWN;
if (toolchain) if (toolchain)
t = toolchain->type(); type = toolchain->type();
if (t != ProjectExplorer::ToolChain::MSVC && t != ProjectExplorer::ToolChain::WINCE) { if (type != ProjectExplorer::ToolChain::MSVC && type != ProjectExplorer::ToolChain::WINCE) {
if (value(name, "makeCmd").toString().isEmpty()) if (value(name, "makeCmd").toString().isEmpty())
args << "-w"; args << "-w";
} }
...@@ -117,8 +117,7 @@ bool MakeStep::init(const QString &name) ...@@ -117,8 +117,7 @@ bool MakeStep::init(const QString &name)
setEnabled(name, true); setEnabled(name, true);
setArguments(name, args); 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); setBuildParser(ProjectExplorer::Constants::BUILD_PARSER_MSVC);
else else
setBuildParser(ProjectExplorer::Constants::BUILD_PARSER_GCC); setBuildParser(ProjectExplorer::Constants::BUILD_PARSER_GCC);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment