From 924c8bf8b175c13af72d83588a9caf4c1d8fcd58 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 14 Oct 2015 11:13:07 +0200 Subject: [PATCH] ToolChains: Fix theoretically possible null pointer access This can not be triggered right now, but somebody might run into this later. Change-Id: Ibc635e7dca1db7ab77376b5373db67dcdd2bb46e Reviewed-by: Orgad Shaneh --- src/plugins/projectexplorer/gcctoolchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 4f9388db09c..56db092550f 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -831,10 +831,10 @@ QList GccToolChainFactory::autoDetectToolchains(const QString &comp foreach (const Abi &abi, abiList) { QScopedPointer tc(createToolChain(true)); - tc->setMacroCache(QStringList(), macros); if (tc.isNull()) return result; + tc->setMacroCache(QStringList(), macros); tc->setCompilerCommand(compilerPath); tc->setSupportedAbis(abiList); tc->setTargetAbi(abi);