From c71fc093444dc367c2a4b7d3d85e1fcdfd9c9d59 Mon Sep 17 00:00:00 2001 From: karnaze Date: Thu, 28 May 1998 00:42:26 +0000 Subject: [PATCH] fixed memory leak from prev checkin git-svn-id: svn://10.0.0.236/trunk@2447 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/forms/src/nsInputFrame.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/html/forms/src/nsInputFrame.cpp b/mozilla/layout/html/forms/src/nsInputFrame.cpp index a9df74f0b26..e55f564aea8 100644 --- a/mozilla/layout/html/forms/src/nsInputFrame.cpp +++ b/mozilla/layout/html/forms/src/nsInputFrame.cpp @@ -365,11 +365,13 @@ NS_METHOD nsInputFrame::HandleEvent(nsIPresContext& aPresContext, // every image button will get every event. nsIView* view; GetView(view); - nsInput* content = (nsInput *)mContent; - if (view && (content->GetWidgetSupports() != aEvent->widgetSupports)) { - aEventStatus = nsEventStatus_eIgnore; + if (view) { NS_RELEASE(view); - return NS_OK; + nsInput* content = (nsInput *)mContent; + if (content->GetWidgetSupports() != aEvent->widgetSupports) { + aEventStatus = nsEventStatus_eIgnore; + return NS_OK; + } } switch (aEvent->message) {