[vlc-devel] commit: macosx: Assert() for special error case. (Pierre d'Herbemont )
git version control
git at videolan.org
Sun Aug 3 18:30:06 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Aug 3 18:32:45 2008 +0200| [fbfcdf0221530cdcdf18c030dd5ca9ddacce3ea2] | committer: Pierre d'Herbemont
macosx: Assert() for special error case.
Note: We should probably throw exception, and handle them a bit more gracefully, as we do in vlc_app.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fbfcdf0221530cdcdf18c030dd5ca9ddacce3ea2
---
modules/gui/macosx/simple_prefs.m | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index cd1eae1..174e6c3 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -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;
More information about the vlc-devel
mailing list