diff options
author | dt <qtc-committer@nokia.com> | 2009-09-03 17:45:55 +0200 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2009-09-09 16:43:09 +0200 |
commit | f6ab135517d9c45b711d732bc02f107c2ee8ca1e (patch) | |
tree | 1657dfd762a85ad02081e9eb02d5ac7cb5d973d3 | |
parent | a2b7343c07511edc09fee13a701e21c8fc197fe8 (diff) |
Fix potential crash.
(cherry picked from commit 778db1bf2df839b9cbe969333d22a65083ab74f6)
-rw-r--r-- | src/plugins/qt4projectmanager/makestep.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp index e22eea26d6..acc1db3a8f 100644 --- a/src/plugins/qt4projectmanager/makestep.cpp +++ b/src/plugins/qt4projectmanager/makestep.cpp @@ -220,7 +220,10 @@ void MakeStepConfigWidget::updateDetails() // so we only do it for unix and if the user didn't override the make command // but for now this is the least invasive change QStringList args = m_makeStep->value(m_buildConfiguration, "makeargs").toStringList(); - ProjectExplorer::ToolChain::ToolChainType t = qobject_cast<Qt4Project *>(pro)->toolChain(m_buildConfiguration)->type(); + ProjectExplorer::ToolChain::ToolChainType t = ProjectExplorer::ToolChain::UNKNOWN; + ProjectExplorer::ToolChain *toolChain = qobject_cast<Qt4Project *>(pro)->toolChain(m_buildConfiguration); + if (toolChain) + t = toolChain->type(); if (t != ProjectExplorer::ToolChain::MSVC && t != ProjectExplorer::ToolChain::WINCE) { if (m_makeStep->value(m_buildConfiguration, "makeCmd").toString().isEmpty()) args << "-w"; |