diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index fe00a8236..9bbb2e694 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -61,7 +61,10 @@ private: std::string GetCurrentValue() { std::string val; - val.assign(&this->CurrentValue[0], this->CurrentValue.size()); + if(this->CurrentValue.size()) + { + val.assign(&this->CurrentValue[0], this->CurrentValue.size()); + } return val; }