diff options
author | David Cole <david.cole@kitware.com> | 2011-01-27 11:57:12 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-01-27 11:57:12 (GMT) |
commit | b08657cf0fbe2d02d87a866e7c2dfc29f8d80571 (patch) | |
tree | 9ef17b102104a79a77694d1beb298be735fca69e /Source | |
parent | 451c5f61c26fc1db154605dc5e4b1c07d584b24b (diff) | |
download | CMake-b08657cf0fbe2d02d87a866e7c2dfc29f8d80571.zip CMake-b08657cf0fbe2d02d87a866e7c2dfc29f8d80571.tar.gz CMake-b08657cf0fbe2d02d87a866e7c2dfc29f8d80571.tar.bz2 |
Xcode: Fix crash: avoid strlen call on NULL char *
Thanks to Johan Björk for the report on the CMake mailing list.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 1395865..358721f 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) { |