Commit aba1c1aa authored by David Cole's avatar David Cole Committed by Kitware Robot

Merge topic 'fix-macos-findprogramm-crash'

0d2f5c8d Fix crash if app bundle executeable couldn't be found
parents 4a97a2b9 0d2f5c8d
......@@ -175,6 +175,8 @@ std::string cmFindProgramCommand::GetBundleExecutable(std::string bundlePath)
// And finally to a c++ string
executable = bundlePath + "/Contents/MacOS/" + std::string(buffer);
// Only release CFURLRef if it's not null
CFRelease( executableURL );
}
// Any CF objects returned from functions with "create" or
......@@ -182,7 +184,6 @@ std::string cmFindProgramCommand::GetBundleExecutable(std::string bundlePath)
CFRelease( bundlePathCFS );
CFRelease( bundleURL );
CFRelease( appBundle );
CFRelease( executableURL );
#endif
return executable;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment