summaryrefslogtreecommitdiffstats
path: root/Source/cmExecuteProcessCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-03-22 22:21:45 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-03-22 22:21:45 (GMT)
commitf4e9a5e5ea6c960052af860a2b26b2c1dd4f1d3c (patch)
tree1304031217e9bd7ed9a5760d331abe18a70ef4dc /Source/cmExecuteProcessCommand.cxx
parenteb773486f35791edbbb2305023fb81bb7c206e85 (diff)
downloadCMake-f4e9a5e5ea6c960052af860a2b26b2c1dd4f1d3c.zip
CMake-f4e9a5e5ea6c960052af860a2b26b2c1dd4f1d3c.tar.gz
CMake-f4e9a5e5ea6c960052af860a2b26b2c1dd4f1d3c.tar.bz2
ENH: do not dereference empty stl vectors
Diffstat (limited to 'Source/cmExecuteProcessCommand.cxx')
-rw-r--r--Source/cmExecuteProcessCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx
index 1d9db30..4090529 100644
--- a/Source/cmExecuteProcessCommand.cxx
+++ b/Source/cmExecuteProcessCommand.cxx
@@ -295,11 +295,11 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args)
cmExecuteProcessCommandFixText(tempError);
// Store the output obtained.
- if(!output_variable.empty())
+ if(!output_variable.empty() && tempOutput.size())
{
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());
}