vlc | branch: master | Felix Paul Kühne <[email protected]> | Wed Jun 1 21:23:40 2011 +0200| [68e5d329206610c72bf20f0facfedbbe107d2523] | committer: Felix Paul Kühne
macosx: fixed rare crash when saving the full prefs > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68e5d329206610c72bf20f0facfedbbe107d2523 --- 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 085883b..7bfc124 100644 --- a/modules/gui/macosx/prefs_widgets.m +++ b/modules/gui/macosx/prefs_widgets.m @@ -1124,11 +1124,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 _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
