Commit 81be7e6a authored by Felix Paul Kühne's avatar Felix Paul Kühne

mac plugin: add additional sanity checks before access objc objects

parent b65551b3
......@@ -338,7 +338,8 @@ bool VlcPluginMac::handle_event(void *event)
CGPoint point = CGPointMake(cocoaEvent->data.mouse.pluginX,
// Flip the y coordinate
npwindow.height - cocoaEvent->data.mouse.pluginY);
[controllerLayer handleMouseDown:[browserRootLayer convertPoint:point toLayer:controllerLayer]];
if (controllerLayer)
[controllerLayer handleMouseDown:[browserRootLayer convertPoint:point toLayer:controllerLayer]];
return true;
}
......@@ -352,7 +353,8 @@ bool VlcPluginMac::handle_event(void *event)
// Flip the y coordinate
npwindow.height - cocoaEvent->data.mouse.pluginY);
[controllerLayer handleMouseUp:[browserRootLayer convertPoint:point toLayer:controllerLayer]];
if (controllerLayer)
[controllerLayer handleMouseUp:[browserRootLayer convertPoint:point toLayer:controllerLayer]];
return true;
}
......@@ -369,7 +371,8 @@ bool VlcPluginMac::handle_event(void *event)
// Flip the y coordinate
npwindow.height - cocoaEvent->data.mouse.pluginY);
[controllerLayer handleMouseDragged:[browserRootLayer convertPoint:point toLayer:controllerLayer]];
if (controllerLayer)
[controllerLayer handleMouseDragged:[browserRootLayer convertPoint:point toLayer:controllerLayer]];
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment