Potential null pointer dereferences in cmGeneratorTarget
One of the issues identified by running cppcheck
on a macOS build of cmake:
/Users/craig/Projects/cmake/Source/cmGeneratorTarget.cxx:6438:48: warning: Possible null pointer dereference: configProp [nullPointer]
if (cmProp config_outdir = this->GetProperty(configProp)) {
^
/Users/craig/Projects/cmake/Source/cmGeneratorTarget.cxx:6429:28: note: Assignment 'configProp=nullptr', assigned value is 0
const char* configProp = nullptr;
^
/Users/craig/Projects/cmake/Source/cmGeneratorTarget.cxx:6431:7: note: Assuming condition is false
if (!configPropStr.empty()) {
^
/Users/craig/Projects/cmake/Source/cmGeneratorTarget.cxx:6438:48: note: Null pointer dereference
if (cmProp config_outdir = this->GetProperty(configProp)) {
^
/Users/craig/Projects/cmake/Source/cmGeneratorTarget.cxx:6514:48: warning: Possible null pointer dereference: configProp [nullPointer]
if (cmProp config_outdir = this->GetProperty(configProp)) {
^
/Users/craig/Projects/cmake/Source/cmGeneratorTarget.cxx:6505:28: note: Assignment 'configProp=nullptr', assigned value is 0
const char* configProp = nullptr;
^
/Users/craig/Projects/cmake/Source/cmGeneratorTarget.cxx:6507:7: note: Assuming condition is false
if (!configPropStr.empty()) {
^
/Users/craig/Projects/cmake/Source/cmGeneratorTarget.cxx:6514:48: note: Null pointer dereference
if (cmProp config_outdir = this->GetProperty(configProp)) {
^
@vvs31415 This appears to be a result of the change in 36aba012. I actually triggered this dereferencing of a null pointer in some recent work exploring another merge request, so it is a genuine bug.