]> git.sesse.net Git - vlc/commitdiff
quartztext: fix a crash when we tried to find the lenght of a CFString that was not...
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 13 Aug 2008 21:42:35 +0000 (23:42 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 13 Aug 2008 21:42:35 +0000 (23:42 +0200)
(Another bug fixed due to the great new apple-bugreport mailinglist)

modules/misc/quartztext.c

index d21dfbc37da7f2cd3724a402f3b2c3fdc7989cc7..27517e419c80e3a4a6bacf6859a2884c9abdf0f0 100644 (file)
@@ -365,6 +365,9 @@ static void ConvertToUTF16( const char *psz_utf8_str, uint32_t *pi_strlen, UniCh
     int           i_string_length;
 
     p_cfString = CFStringCreateWithCString( NULL, psz_utf8_str, kCFStringEncodingUTF8 );
+    if( !p_cfString )
+        return;
+
     i_string_length = CFStringGetLength( p_cfString );
 
     if( pi_strlen )