Check dialog return value
authorRafaël Carré <funman@videolan.org>
Sun, 20 Apr 2008 15:35:53 +0000 (17:35 +0200)
committerRafaël Carré <funman@videolan.org>
Sun, 20 Apr 2008 15:35:53 +0000 (17:35 +0200)
modules/gui/macosx/playlist.m

index 71cf5e3..69cebaa 100644 (file)
     ret_v = intf_UserStringInput( p_playlist, _("New Node"),
         _("Please enter a name for the new node."), &psz_name );
 
     ret_v = intf_UserStringInput( p_playlist, _("New Node"),
         _("Please enter a name for the new node."), &psz_name );
 
-    if( psz_name != NULL && psz_name != "" )
+    if( ret_v != DIALOG_CANCELLED && psz_name && *psz_name )
         p_item = playlist_NodeCreate( p_playlist, psz_name,
                                       p_playlist->p_local_category, 0, NULL );
     else if(! config_GetInt( p_playlist, "interact" ) )
         p_item = playlist_NodeCreate( p_playlist, psz_name,
                                       p_playlist->p_local_category, 0, NULL );
     else if(! config_GetInt( p_playlist, "interact" ) )