From: RĂ©mi Denis-Courmont Date: Sun, 24 Aug 2008 18:15:56 +0000 (+0300) Subject: Memory error handling X-Git-Tag: 0.9.0~13 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a06aeb0a485e6f69f6334dd2f5a5a366c03cb793;p=vlc Memory error handling --- diff --git a/include/vlc_charset.h b/include/vlc_charset.h index 76d9a03ad1..5bd3faa429 100644 --- a/include/vlc_charset.h +++ b/include/vlc_charset.h @@ -72,7 +72,8 @@ static inline char *FromWide (const wchar_t *wide) char *out = (char *)malloc (len); - WideCharToMultiByte (CP_UTF8, 0, wide, -1, out, len, NULL, NULL); + if (out) + WideCharToMultiByte (CP_UTF8, 0, wide, -1, out, len, NULL, NULL); return out; } #endif