diff --git a/common/include/villas/exceptions.hpp b/common/include/villas/exceptions.hpp index fa96cbf10..39824a214 100644 --- a/common/include/villas/exceptions.hpp +++ b/common/include/villas/exceptions.hpp @@ -117,7 +117,9 @@ public: ss << " Please consult the user documentation for details:" << std::endl; ss << " " << docUri() << std::endl; - return ss.str().c_str(); + auto str = new std::string(ss.str()); + + return str->c_str(); } };