[vlc-devel] [PATCH] macosx: don't assign NULL as pref button tooltip

Faustino E. Osuna enrique.osuna at gmail.com
Sun Jan 22 15:58:14 CET 2012


This patch prevents the creation an NSString from NULL. Should fix #5899.
---
 modules/gui/macosx/simple_prefs.m |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 445d4c7..1347a96 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -434,7 +434,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
 - (void)setupButton: (NSButton *)object forBoolValue: (const char *)name
 {
     [object setState: config_GetInt( p_intf, name )];
-    [object setToolTip: [NSString stringWithUTF8String: config_GetLabel( p_intf, name )]];
+    [object setToolTip: [NSString stringWithUTF8String: config_GetLabel( p_intf, name ) ?: ""]];
 }
 
 - (void)setupField:(NSTextField *)o_object forOption:(const char *)psz_option
-- 
1.7.7.4




More information about the vlc-devel mailing list