[vlc-commits] macosx/wizard: add missing error handling

Felix Paul Kühne git at videolan.org
Sat Aug 25 13:16:03 CEST 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Aug 24 20:02:54 2012 +0200| [111d6a255db16d7aa234ce87d7911ccad2520461] | committer: Felix Paul Kühne

macosx/wizard: add missing error handling
(cherry picked from commit 6100eb881537499c6de97bd5cb43c70f56455de1)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=111d6a255db16d7aa234ce87d7911ccad2520461
---

 modules/gui/macosx/wizard.m |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/gui/macosx/wizard.m b/modules/gui/macosx/wizard.m
index dfd266c..5a103ee 100644
--- a/modules/gui/macosx/wizard.m
+++ b/modules/gui/macosx/wizard.m
@@ -1239,11 +1239,9 @@ static VLCWizard *_o_sharedInstance = nil;
                 UTF8String],
                 VLC_INPUT_OPTION_TRUSTED );
 
-            /* FIXME: playlist_AddInput() can fail */
-            playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP,
-                PLAYLIST_END, true, pl_Unlocked );
+            int returnValue = playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP, PLAYLIST_END, true, pl_Unlocked );
 
-            if( x == 0 )
+            if( x == 0 && returnValue != VLC_SUCCESS)
             {
                 /* play the first item and add the others afterwards */
                 PL_LOCK;



More information about the vlc-commits mailing list