From 8932999a96dc71d9938b4f90ff70da58e63104f4 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Sat, 5 Feb 2000 23:11:20 +0000 Subject: [PATCH] fix nsIToolkit leak. r=smfr git-svn-id: svn://10.0.0.236/trunk@59904 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/mac/nsMacWindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mozilla/widget/src/mac/nsMacWindow.cpp b/mozilla/widget/src/mac/nsMacWindow.cpp index b5c5584d4cc..5e86e1050fa 100644 --- a/mozilla/widget/src/mac/nsMacWindow.cpp +++ b/mozilla/widget/src/mac/nsMacWindow.cpp @@ -307,7 +307,7 @@ nsresult nsMacWindow::StandardCreate(nsIWidget *aParent, nsNativeWidget aNativeParent) { short bottomPinDelta = 0; // # of pixels to subtract to pin window bottom - nsIToolkit *theToolkit = aToolkit; + nsCOMPtr theToolkit = aToolkit; // build the main native window if (aNativeParent == nsnull) @@ -340,7 +340,7 @@ nsresult nsMacWindow::StandardCreate(nsIWidget *aParent, // ...fall through... mOffsetParent = aParent; if(aParent != nsnull){ - theToolkit = (nsIToolkit*)(aParent->GetToolkit()); + theToolkit = getter_AddRefs(aParent->GetToolkit()); } mAcceptsActivation = PR_FALSE; @@ -691,8 +691,7 @@ NS_IMETHODIMP nsMacWindow::GetScreenBounds(nsRect &aRect) { //------------------------------------------------------------------------- PRBool nsMacWindow::OnPaint(nsPaintEvent &event) { - - return PR_TRUE; // don't dispatch the update event + return PR_TRUE; // don't dispatch the update event } //-------------------------------------------------------------------------