Merge tag 'v0.18.18' into v0.19.x

This commit is contained in:
Max Kellermann
2014-11-18 21:38:44 +01:00
5 changed files with 17 additions and 4 deletions

View File

@@ -46,7 +46,11 @@ AllocatedPath
AllocatedPath::FromUTF8(const char *path_utf8)
{
#ifdef HAVE_GLIB
return AllocatedPath(Donate(), ::PathFromUTF8(path_utf8));
char *path = ::PathFromUTF8(path_utf8);
if (path == nullptr)
return AllocatedPath::Null();
return AllocatedPath(Donate(), path);
#else
return FromFS(path_utf8);
#endif