[vlc-devel] [PATCH] macosx: fix crash by dis-ambiguating var names
Andrey Utkin
andrey.krieger.utkin at gmail.com
Wed Apr 18 17:04:50 CEST 2012
---
I had crashes on this code execution, because of invalid pointers derived from
callDelegateOfObjectAndSendNotificationWithArgs argument.
The following change fixed it.
---8<---
.../macosx/framework/Sources/VLCEventManager.m | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/projects/macosx/framework/Sources/VLCEventManager.m b/projects/macosx/framework/Sources/VLCEventManager.m
index 4239899..67fb490 100644
--- a/projects/macosx/framework/Sources/VLCEventManager.m
+++ b/projects/macosx/framework/Sources/VLCEventManager.m
@@ -227,9 +227,9 @@ static void * EventDispatcherMainLoop(void * user_data)
if( [NSThread isMainThread] )
{
- NSData *message = [NSData dataWithBytes:&message length:sizeof(message_t)];
- [self addMessageToHandleOnMainThread:message];
- [self callDelegateOfObjectAndSendNotificationWithArgs:[message retain] /* released in the call */];
+ NSData *nsd_message = [NSData dataWithBytes:&message length:sizeof(message_t)];
+ [self addMessageToHandleOnMainThread:nsd_message];
+ [self callDelegateOfObjectAndSendNotificationWithArgs:[nsd_message retain] /* released in the call */];
}
else
{
--
1.7.5.4
More information about the vlc-devel
mailing list