]> git.sesse.net Git - vlc/commitdiff
macosx: fix crash when parsing incorrect debug logs
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 2 Jul 2013 21:13:27 +0000 (23:13 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 2 Jul 2013 21:14:30 +0000 (23:14 +0200)
modules/gui/macosx/intf.m

index bf9b1b113ab4ee1c8f6e2402430117987291e13e..f850f8191573a0d598c1ced34c4329014369e352 100644 (file)
@@ -2013,6 +2013,11 @@ static VLCMain *_o_sharedMainInstance = nil;
             [o_msg_arr removeObjectAtIndex: 0];
             [o_msg_arr removeObjectAtIndex: 1];
         }
+        if (!item->psz_module)
+            return;
+        if (!str)
+            return;
+
         firstString = [NSString stringWithFormat:@"%s%s", item->psz_module, ppsz_type[i_type]];
         secondString = [NSString stringWithFormat:@"%@%s\n", firstString, str];