[vlc-commits] macosx: fix crash when opening goto window (close #9488)

David Fuhrmann git at videolan.org
Sun Sep 29 12:16:58 CEST 2013


vlc/vlc-2.1 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Fri Sep 27 21:50:15 2013 +0200| [4212fcdc49a3aeb44de4eb86ecb6d29e16a150dd] | committer: David Fuhrmann

macosx: fix crash when opening goto window (close #9488)
(cherry picked from commit dcf42ab9608633a463798e09b194ef81acde5856)

Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>

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

 modules/gui/macosx/misc.m |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index b871a89..b3689fa 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -883,7 +883,12 @@ void _drawFrameInRect(NSRect frameRect)
 
 - (NSString*)stringForObjectValue:(id)obj
 {
-    return obj;
+    if([obj isKindOfClass:[NSString class]])
+        return obj;
+    if([obj isKindOfClass:[NSNumber class]])
+        return [obj stringValue];
+
+    return nil;
 }
 
 - (BOOL)getObjectValue:(id*)obj forString:(NSString*)string errorDescription:(NSString**)error



More information about the vlc-commits mailing list