diff --git a/suite/browser/src/nsUrlWidget.cpp b/suite/browser/src/nsUrlWidget.cpp index 28dcfa2a762..0a1b36fd253 100644 --- a/suite/browser/src/nsUrlWidget.cpp +++ b/suite/browser/src/nsUrlWidget.cpp @@ -89,8 +89,8 @@ nsUrlWidget::SetURLToHiddenControl( char const *aURL, nsIDOMWindow *parent ) ppDocShell->QueryInterface(NS_GET_IID(nsIBaseWindow), (void **)&ppBaseWindow); if (ppBaseWindow != NULL) { - nsIWidget* ppWidget; - ppBaseWindow->GetMainWidget(&ppWidget); + nsCOMPtr ppWidget; + ppBaseWindow->GetMainWidget(getter_AddRefs(ppWidget)); hMainFrame = (HWND)ppWidget->GetNativeData(NS_NATIVE_WIDGET); }