* fixed __intf_UserStringInput
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 17 Sep 2006 19:13:33 +0000 (19:13 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 17 Sep 2006 19:13:33 +0000 (19:13 +0000)
src/interface/interaction.c

index 6b884b1..8d32327 100644 (file)
@@ -398,6 +398,7 @@ int __intf_UserStringInput( vlc_object_t *p_this,
 {
     int i_ret;
     DIALOG_INIT( TWOWAY );
+    p_new->i_type = INTERACT_DIALOG_TWOWAY;
     p_new->psz_title = strdup( psz_title );
     p_new->psz_description = strdup( psz_description );
 
@@ -407,8 +408,8 @@ int __intf_UserStringInput( vlc_object_t *p_this,
 
     if( i_ret != DIALOG_CANCELLED )
     {
-        assert( p_new->psz_returned[0] );
-        *ppsz_usersString = strdup( p_new->psz_returned[0] );
+        *ppsz_usersString = p_new->psz_returned[0]?
+                                    strdup( p_new->psz_returned[0] ) : NULL;
     }
     return i_ret;
 }