From 570590058d16274005a4994fd8f1046d0eaf7f74 Mon Sep 17 00:00:00 2001 From: Toon Schoenmakers Date: Tue, 8 Dec 2015 11:53:16 +0100 Subject: [PATCH] Don't create a std::string with a nullptr --- include/inivalue.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/inivalue.h b/include/inivalue.h index 4f574af0..00373e69 100644 --- a/include/inivalue.h +++ b/include/inivalue.h @@ -112,7 +112,8 @@ class PHPCPP_EXPORT IniValue */ std::string stringValue() const { - return std::string(rawValue()); + auto value = rawValue(); + return std::string(value ? value : ""); } /**