ENH: do not dereference empty stl vectors
This commit is contained in:
parent
eb773486f3
commit
f4e9a5e5ea
@ -295,11 +295,11 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args)
|
|||||||
cmExecuteProcessCommandFixText(tempError);
|
cmExecuteProcessCommandFixText(tempError);
|
||||||
|
|
||||||
// Store the output obtained.
|
// Store the output obtained.
|
||||||
if(!output_variable.empty())
|
if(!output_variable.empty() && tempOutput.size())
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(output_variable.c_str(), &*tempOutput.begin());
|
this->Makefile->AddDefinition(output_variable.c_str(), &*tempOutput.begin());
|
||||||
}
|
}
|
||||||
if(!merge_output && !error_variable.empty())
|
if(!merge_output && !error_variable.empty() && tempError.size())
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(error_variable.c_str(), &*tempError.begin());
|
this->Makefile->AddDefinition(error_variable.c_str(), &*tempError.begin());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user