Bug 469137 - Initialize topLevelWidget in nsBaseWidget::GetTopLevelWidget, r=roc.
authorMarkus Stange <mstange@themasta.com>
Mon, 15 Dec 2008 14:43:48 +0100
changeset 22805 6dec6e84f3be0a22d4e8dcfbc03f97b107eb3a61
parent 22804 d388f6ab98a1e0afac2c237a7af983e20b5248f4
child 22806 b858eeb64326866d9561474bdbab77c2805c6232
push id4189
push usermstange@themasta.com
push dateMon, 15 Dec 2008 13:45:26 +0000
treeherdermozilla-central@b858eeb64326 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs469137
milestone1.9.2a1pre
Bug 469137 - Initialize topLevelWidget in nsBaseWidget::GetTopLevelWidget, r=roc.
widget/src/xpwidgets/nsBaseWidget.cpp
--- a/widget/src/xpwidgets/nsBaseWidget.cpp
+++ b/widget/src/xpwidgets/nsBaseWidget.cpp
@@ -291,17 +291,17 @@ nsIWidget* nsBaseWidget::GetParent(void)
 
 //-------------------------------------------------------------------------
 //
 // Get this nsBaseWidget top level widget
 //
 //-------------------------------------------------------------------------
 nsIWidget* nsBaseWidget::GetTopLevelWidget(PRInt32* aLevelsUp)
 {
-  nsIWidget *topLevelWidget, *widget = this;
+  nsIWidget *topLevelWidget = nsnull, *widget = this;
   if (aLevelsUp)
     *aLevelsUp = -1;
   while (widget) {
     topLevelWidget = widget;
     widget = widget->GetParent();
     if (aLevelsUp)
       ++*aLevelsUp;
   }