Imported Upstream version 17.2.0
[platform/upstream/libzypp.git] / zypp / base / String.h
index 285c7dd..9214550 100644 (file)
@@ -142,10 +142,10 @@ namespace zypp
 #endif
 
     inline std::string asString( const char * t )
-    { return t; }
+    { return t == nullptr ? std::string() : t; }
 
     inline std::string asString( char * t )
-    { return t; }
+    { return t == nullptr ? std::string() : t; }
 
     template<class Tp>
         inline std::string asString( const Tp &t )