Breakage fix for patch for bug 637367 (4da037fe27b0). a=breakage-fix
authorSteven Michaud <smichaud@pobox.com>
Fri, 18 Mar 2011 15:27:20 -0500
changeset 63444 59f8f339653f
parent 63443 4da037fe27b0
child 63445 23455773db73
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersbreakage-fix
bugs637367
milestone2.0b13pre
Breakage fix for patch for bug 637367 (4da037fe27b0). a=breakage-fix
layout/generic/nsObjectFrame.cpp
--- a/layout/generic/nsObjectFrame.cpp
+++ b/layout/generic/nsObjectFrame.cpp
@@ -1980,17 +1980,18 @@ static void DrawPlugin(ImageContainer* a
   nsObjectFrame* frame = static_cast<nsPluginInstanceOwner*>(aPluginInstanceOwner)->GetOwner();
   if (frame) {
     frame->UpdateImageLayer(aContainer, gfxRect(0,0,0,0));
   }
 }
 
 static void OnDestroyImage(void* aPluginInstanceOwner)
 {
-  NS_RELEASE(static_cast<nsPluginInstanceOwner*>(aPluginInstanceOwner));
+  nsPluginInstanceOwner* owner = static_cast<nsPluginInstanceOwner*>(aPluginInstanceOwner);
+  NS_IF_RELEASE(owner);
 }
 
 void
 nsObjectFrame::UpdateImageLayer(ImageContainer* aContainer, const gfxRect& aRect)
 {
   if (!mInstanceOwner) {
     return;
   }