From 3067d7718e664b230788efa40720ee1b57055314 Mon Sep 17 00:00:00 2001 From: Georg Fritzsche Date: Tue, 12 Feb 2013 19:03:25 +0100 Subject: [PATCH] Bug 752422 - Add null-check for plugin tag. r=bsmedberg --- dom/plugins/base/nsPluginHost.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index d4db7cc016ca..86878f2072ae 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -3170,14 +3170,20 @@ nsPluginHost::StopPluginInstance(nsNPAPIPluginInstance* aInstance) nsPluginTag* pluginTag = TagForPlugin(oldestInstance->GetPlugin()); oldestInstance->Destroy(); mInstances.RemoveElement(oldestInstance); - OnPluginInstanceDestroyed(pluginTag); + // TODO: Remove this check once bug 752422 was investigated + if (pluginTag) { + OnPluginInstanceDestroyed(pluginTag); + } } } } else { nsPluginTag* pluginTag = TagForPlugin(aInstance->GetPlugin()); aInstance->Destroy(); mInstances.RemoveElement(aInstance); - OnPluginInstanceDestroyed(pluginTag); + // TODO: Remove this check once bug 752422 was investigated + if (pluginTag) { + OnPluginInstanceDestroyed(pluginTag); + } } return NS_OK;