Construct a Null AllocatedPath if the filename conversion into UTF8 failed
This commit is contained in:
parent
c64ad78c7b
commit
7e7b403043
1
NEWS
1
NEWS
|
@ -1,6 +1,7 @@
|
||||||
ver 0.18.18 (not yet released)
|
ver 0.18.18 (not yet released)
|
||||||
* decoder
|
* decoder
|
||||||
- ffmpeg: support opus
|
- ffmpeg: support opus
|
||||||
|
* fix crash on failed filename charset conversion
|
||||||
|
|
||||||
ver 0.18.17 (2014/11/02)
|
ver 0.18.17 (2014/11/02)
|
||||||
* playlist
|
* playlist
|
||||||
|
|
|
@ -46,7 +46,11 @@ AllocatedPath::Build(const_pointer a, const_pointer b)
|
||||||
AllocatedPath
|
AllocatedPath
|
||||||
AllocatedPath::FromUTF8(const char *path_utf8)
|
AllocatedPath::FromUTF8(const char *path_utf8)
|
||||||
{
|
{
|
||||||
return AllocatedPath(Donate(), ::PathFromUTF8(path_utf8));
|
char *path = ::PathFromUTF8(path_utf8);
|
||||||
|
if (path == nullptr)
|
||||||
|
return AllocatedPath::Null();
|
||||||
|
|
||||||
|
return AllocatedPath(Donate(), path);
|
||||||
}
|
}
|
||||||
|
|
||||||
AllocatedPath
|
AllocatedPath
|
||||||
|
|
Loading…
Reference in New Issue