[vlc-commits] macosx: fixed rare crash when saving the full prefs
Felix Paul Kühne
git at videolan.org
Wed Jun 1 21:22:11 CEST 2011
vlc/vlc-1.1 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jun 1 21:21:49 2011 +0200| [dd6689f07d9d32dac99a3fdf76fa93fe5d88eb31] | committer: Felix Paul Kühne
macosx: fixed rare crash when saving the full prefs
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=dd6689f07d9d32dac99a3fdf76fa93fe5d88eb31
---
modules/gui/macosx/prefs_widgets.m | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index bc572b3..9859e8a 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -1111,11 +1111,14 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
- (char *)stringValue
{
- if( [o_combo indexOfSelectedItem] >= 0 )
- return strdup( p_item->ppsz_list[[o_combo indexOfSelectedItem]] );
- else
- return strdup( [[VLCMain sharedInstance]
- delocalizeString: [o_combo stringValue]] );
+ if( [o_combo indexOfSelectedItem] >= 0 ) {
+ if( p_item->ppsz_list[[o_combo indexOfSelectedItem]] != NULL )
+ return strdup( p_item->ppsz_list[[o_combo indexOfSelectedItem]] );
+ } else {
+ if( [[VLCMain sharedInstance] delocalizeString: [o_combo stringValue]] != NULL )
+ return strdup( [[VLCMain sharedInstance] delocalizeString: [o_combo stringValue]] );
+ }
+ return NULL;
}
- (void)resetValues
More information about the vlc-commits
mailing list