diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-10-30 14:18:18 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2014-10-30 14:39:32 +0100 |
commit | b119b41b4b11a3555e45b7a52f4872cdb30507a7 (patch) | |
tree | e4d0e6eaa5667abc6f773b435b740d209a31e5ad | |
parent | 7296068ce76be5e0c33fd70918688f7ffb24bc72 (diff) |
Do not send focus event to missing plugins on OS X
Fix a crash when trying to focus a pluginview that doesn't have a loaded
plugin.
Task-number: QTBUG-40273
Change-Id: I0875cab81a3484094fc705d59df80b87ca83a9ff
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
-rw-r--r-- | Source/WebCore/plugins/mac/PluginViewMac.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/WebCore/plugins/mac/PluginViewMac.mm b/Source/WebCore/plugins/mac/PluginViewMac.mm index f8f2bc634..60a6d7a67 100644 --- a/Source/WebCore/plugins/mac/PluginViewMac.mm +++ b/Source/WebCore/plugins/mac/PluginViewMac.mm @@ -248,6 +248,9 @@ void PluginView::setFocus(bool focused) Widget::setFocus(focused); + if (!m_plugin || !m_isStarted || m_status != PluginStatusLoadedSuccessfully) + return; + NPCocoaEvent cocoaEvent; initializeNPCocoaEvent(&cocoaEvent); cocoaEvent.type = NPCocoaEventFocusChanged; |