summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-01-27 06:57:12 -0500
committerDavid Cole <david.cole@kitware.com>2011-01-27 06:57:12 -0500
commitb08657cf0fbe2d02d87a866e7c2dfc29f8d80571 (patch)
tree9ef17b102104a79a77694d1beb298be735fca69e
parent451c5f61c26fc1db154605dc5e4b1c07d584b24b (diff)
downloadcmake-b08657cf0fbe2d02d87a866e7c2dfc29f8d80571.tar.gz
Xcode: Fix crash: avoid strlen call on NULL char *
Thanks to Johan Björk for the report on the CMake mailing list.
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 1395865d2a..358721f83d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2693,7 +2693,7 @@ void cmGlobalXCodeGenerator
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
const char* osxArch =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_ARCHITECTURES");
- if(strlen(osxArch) == 0)
+ if(!osxArch || strlen(osxArch) == 0)
{
if(this->XcodeVersion >= 32)
{