From 943a091e822d6e47c867de15ea79cc39f1691388 Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Wed, 28 Oct 2009 17:01:48 +0100
Subject: [PATCH] Fix crash also in master.

---
 src/plugins/qt4projectmanager/qtversionmanager.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index f3f1753ddb2..adb0dc93909 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -1375,6 +1375,8 @@ QString QtVersion::buildDebuggingHelperLibrary()
     // TODO: the debugging helper doesn't comply to actual tool chain yet
     QList<QSharedPointer<ProjectExplorer::ToolChain> > alltc = toolChains();
     ProjectExplorer::ToolChain *tc = alltc.isEmpty() ? 0 : alltc.first().data();
+    if (!tc)
+        return QApplication::tr("The Qt Version has no toolchain.");)
     tc->addToEnvironment(env);
     QString output;
     QString directory = DebuggingHelperLibrary::copyDebuggingHelperLibrary(qtInstallData, &output);
-- 
GitLab