summaryrefslogtreecommitdiff
path: root/Source/cmVariableWatchCommand.cxx
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2013-08-06 14:32:19 -0400
committerBrad King <brad.king@kitware.com>2013-08-08 13:31:10 -0400
commitb86e37c84f9691cc122e838b653ae0f441c4d1e2 (patch)
tree7c9860be87596e48c63cfd0bd5eb15f3dac82039 /Source/cmVariableWatchCommand.cxx
parentf9bb20fe2bf1d9154a3244579ea84400912473b4 (diff)
downloadcmake-b86e37c84f9691cc122e838b653ae0f441c4d1e2.tar.gz
variable_watch: Check newValue for NULL
On read access, newValue can be NULL since there is no new value, so use the empty string instead.
Diffstat (limited to 'Source/cmVariableWatchCommand.cxx')
-rw-r--r--Source/cmVariableWatchCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx
index 3b75ade440..4eff19e224 100644
--- a/Source/cmVariableWatchCommand.cxx
+++ b/Source/cmVariableWatchCommand.cxx
@@ -80,7 +80,7 @@ static void cmVariableWatchCommandVariableAccessed(
{
cmOStringStream msg;
msg << "Variable \"" << variable.c_str() << "\" was accessed using "
- << accessString << " with value \"" << newValue << "\".";
+ << accessString << " with value \"" << (newValue?newValue:"") << "\".";
makefile->IssueMessage(cmake::LOG, msg.str());
}