]> git.sesse.net Git - vlc/commitdiff
macosx: Assert() for special error case.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 3 Aug 2008 16:32:45 +0000 (18:32 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 3 Aug 2008 16:32:45 +0000 (18:32 +0200)
Note: We should probably throw exception, and handle them a bit more gracefully, as we do in vlc_app.

modules/gui/macosx/simple_prefs.m

index cd1eae18708fc311395bc28b39b8c32213fe083f..174e6c30c47913d5022fb1d9be5aedcf90609b85 100644 (file)
@@ -305,11 +305,10 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
 
     [object removeAllItems];
     p_item = config_FindConfig( VLC_OBJECT(p_intf), name );
-    if( !p_item )
-    {
-        NSLog( @"serious problem, item not found" );
-        return;
-    }
+
+    /* serious problem, if no item found */
+    assert( p_item );
+
     for( int i = 0; i < p_item->i_list; i++ )
     {
         NSMenuItem *mi;
@@ -337,11 +336,10 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
 
     [object removeAllItems];
     p_item = config_FindConfig( VLC_OBJECT(p_intf), name );
-    if( !p_item )
-    {
-        NSLog( @"serious problem, item not found" );
-        return;
-    }
+
+    /* serious problem, if no item found */
+    assert( p_item );
+
     for( int i = 0; i < p_item->i_list; i++ )
     {
         NSMenuItem *mi;