Fix possible crash when checking sysroot

Change-Id: I556ef0db09ceedd32e005b7057c56629d6fda5ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Tobias Hunger
2012-06-28 21:29:46 +02:00
parent 8d81f98cab
commit 47a79e2225

View File

@@ -102,7 +102,9 @@ ProfileInformation::ItemList SysRootProfileInformation::toUserOutput(Profile *p)
bool SysRootProfileInformation::hasSysRoot(const 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) Utils::FileName SysRootProfileInformation::sysRoot(const Profile *p)