aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-18 21:38:44 +0100
committerMax Kellermann <max@duempel.org>2014-11-18 21:38:44 +0100
commitdc03f003ac8e1d569b2d8b679e4f84b7602d560e (patch)
treed7af25f884fb1810c7edaf6fb372aa80cacfa5b2 /src/fs
parent460cfba6ff76ed58e6f6778cfeb9dd424d7fe75a (diff)
parent7aa2104596f283c6af22b7b721267065cda86237 (diff)
downloadmpd-dc03f003ac8e1d569b2d8b679e4f84b7602d560e.tar.gz
mpd-dc03f003ac8e1d569b2d8b679e4f84b7602d560e.tar.xz
mpd-dc03f003ac8e1d569b2d8b679e4f84b7602d560e.zip
Merge tag 'v0.18.18' into v0.19.x
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/AllocatedPath.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fs/AllocatedPath.cxx b/src/fs/AllocatedPath.cxx
index 30ce7e3a9..ceaad73ea 100644
--- a/src/fs/AllocatedPath.cxx
+++ b/src/fs/AllocatedPath.cxx
@@ -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