浏览代码

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];