summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Schoenmakers <toon.schoenmakers@copernica.com>2015-12-08 11:53:16 +0100
committerToon Schoenmakers <toon.schoenmakers@copernica.com>2015-12-08 11:53:16 +0100
commit570590058d16274005a4994fd8f1046d0eaf7f74 (patch)
treee021e93b80cf342fb2f837087fd89a3e59ed0756
parentaec191bc6cbb83884466800a750ecad0b37e254f (diff)
Don't create a std::string with a nullptrv1.5.3
-rw-r--r--include/inivalue.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/inivalue.h b/include/inivalue.h
index 4f574af..00373e6 100644
--- a/include/inivalue.h
+++ b/include/inivalue.h
@@ -112,7 +112,8 @@ public:
*/
std::string stringValue() const
{
- return std::string(rawValue());
+ auto value = rawValue();
+ return std::string(value ? value : "");
}
/**