[vlc-devel] commit: macosx: Use NSAssert for impossible cases. (Pierre d'Herbemont )

git version control git at videolan.org
Sun Jun 15 22:03:44 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Jun 15 21:55:49 2008 +0200| [be05e83bd9e714ef409e0d91b778eaead6c9ab4e]

macosx: Use NSAssert for impossible cases.

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

 modules/gui/macosx/playlist.m |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index 866e852..cbae24b 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -149,24 +149,17 @@
     int i_return = 0;
     playlist_item_t *p_item = NULL;
     playlist_t * p_playlist = pl_Yield( VLCIntf );
-    if( outlineView != o_outline_view )
-    {
-        vlc_object_release( p_playlist );
-        return 0;
-    }
+    NSAssert( outlineView != o_outline_view )
 
-    if( item == nil )
-    {
-        /* root object */
+    if( !item )
         p_item = p_playlist->p_root_category;
-    }
     else
-    {
         p_item = (playlist_item_t *)[item pointerValue];
-    }
+
     if( p_item )
         i_return = p_item->i_children;
-    vlc_object_release( p_playlist );
+
+    pl_Release( VLCIntf );
 
     return i_return > 0 ? i_return : 0;
 }




More information about the vlc-devel mailing list