Commit 0aeb82b6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed crash in case either psz_module or psz_msg are NULL when received from core

Fixes playback of AVI files... ;)
parent dad0ff2f
......@@ -158,13 +158,14 @@ static void MsgCallback( msg_cb_data_t *data, msg_item_t *item, unsigned int i )
int canc = vlc_savecancel();
NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
NSDictionary *o_dict = [NSDictionary dictionaryWithObjects:
[NSArray arrayWithObjects:
[NSString stringWithUTF8String: item->psz_module],
[NSString stringWithUTF8String: item->psz_msg],
[NSNumber numberWithInt: item->i_type], nil]
forKeys:
[NSArray arrayWithObjects: @"Module", @"Message", @"Type", nil]];
/* this may happen from time to time, let's bail out as info would be useless anyway */
if( !item->psz_module || !item->psz_msg )
return;
NSDictionary *o_dict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithUTF8String: item->psz_module], @"Module",
[NSString stringWithUTF8String: item->psz_msg], @"Message",
[NSNumber numberWithInt: item->i_type], @"Type", nil];
[[NSNotificationCenter defaultCenter] postNotificationName: @"VLCCoreMessageReceived"
object: nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment