Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
0aeb82b6
Commit
0aeb82b6
authored
Apr 10, 2009
by
Felix Paul Kühne
Browse files
macosx: fixed crash in case either psz_module or psz_msg are NULL when received from core
Fixes playback of AVI files... ;)
parent
dad0ff2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/gui/macosx/intf.m
View file @
0aeb82b6
...
...
@@ -157,19 +157,20 @@ 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
userInfo:
o_dict
];
[
o_pool
release
];
vlc_restorecancel
(
canc
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment