]> git.sesse.net Git - vlc/commitdiff
Partial memory error handling
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 16 Sep 2007 08:58:37 +0000 (08:58 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 16 Sep 2007 08:58:37 +0000 (08:58 +0000)
src/video_output/vout_intf.c

index aac53af30d59c609ec2702bae3157afef8fa58a3..34452d44bafae2efc0c6272de74371d0d87d30fa 100644 (file)
@@ -661,8 +661,9 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
 
     if ( path != NULL )
     {
-        char *psz_prefix = var_GetString( p_vout, "snapshot-prefix" );
-        if( !psz_prefix ) psz_prefix = strdup( "vlcsnap-" );
+        char *psz_prefix = var_GetNonEmptyString( p_vout, "snapshot-prefix" );
+        if( psz_prefix == NULL )
+            psz_prefix = strdup( "vlcsnap-" );
         else
         {
             char *psz_tmp = str_format( p_vout, psz_prefix );