فهرست منبع

event manager: fix runtime exception

Felix Paul Kühne 11 سال پیش
والد
کامیت
b04ab8c830
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      Sources/VLCEventManager.m

+ 3 - 0
Sources/VLCEventManager.m

@@ -322,6 +322,9 @@ static void * EventDispatcherMainLoop(void * user_data)
     // Check that we were not cancelled, ie, target was released
     if ([self markMessageHandledOnMainThreadIfExists:message]) {
         id target = message.target;
+        if (message.object == NULL)
+            return;
+
         [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:message.object object:target]];
 
         id delegate = [target delegate];