diff --git a/src/plugins/projectexplorer/profileinformation.cpp b/src/plugins/projectexplorer/profileinformation.cpp
index 963ed31944698fb791d9c6723e37e78b49a4c80c..242ecae8c0450366f7a72254d16b5cba9463fb9f 100644
--- a/src/plugins/projectexplorer/profileinformation.cpp
+++ b/src/plugins/projectexplorer/profileinformation.cpp
@@ -102,7 +102,9 @@ ProfileInformation::ItemList SysRootProfileInformation::toUserOutput(Profile *p)
 
 bool SysRootProfileInformation::hasSysRoot(const Profile *p)
 {
-    return !p->value(Core::Id(SYSROOT_INFORMATION)).toString().isEmpty();
+    if (p)
+        return !p->value(Core::Id(SYSROOT_INFORMATION)).toString().isEmpty();
+    return false;
 }
 
 Utils::FileName SysRootProfileInformation::sysRoot(const Profile *p)