瀏覽代碼

event manager: cosmetics

Felix Paul Kühne 10 年之前
父節點
當前提交
79fe195889
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Sources/VLCEventManager.m

+ 3 - 0
Sources/VLCEventManager.m

@@ -155,6 +155,8 @@ static void * EventDispatcherMainLoop(void * user_data)
 
 
             /* Get the first object off the queue. */
             /* Get the first object off the queue. */
             message = [_messageQueue lastObject];    // Released in 'call'
             message = [_messageQueue lastObject];    // Released in 'call'
+            if (!message)
+                break;
             [_messageQueue removeLastObject];
             [_messageQueue removeLastObject];
 
 
             /* Remove duplicate notifications (keep the newest one). */
             /* Remove duplicate notifications (keep the newest one). */
@@ -247,6 +249,7 @@ static void * EventDispatcherMainLoop(void * user_data)
         message.sel = aSelector;
         message.sel = aSelector;
         message.target = aTarget;
         message.target = aTarget;
         message.object = arg;
         message.object = arg;
+        message.name = @"";
         message.type = [arg isKindOfClass:[NSArray class]] ? VLCObjectMethodWithArrayArg : VLCObjectMethodWithObjectArg;
         message.type = [arg isKindOfClass:[NSArray class]] ? VLCObjectMethodWithArrayArg : VLCObjectMethodWithObjectArg;
 
 
         pthread_mutex_lock(&_queueLock);
         pthread_mutex_lock(&_queueLock);