Browse Source

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.
Ben Boeckel 12 years ago
parent
commit
b86e37c84f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/cmVariableWatchCommand.cxx

+ 1 - 1
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());
     }