Fix bustage from bug 405512 by removing unneeded |if| check.
authorreed@reedloden.com
Wed, 16 Jan 2008 23:06:43 -0800
changeset 10354 f356ac1b284d54f58297cfe22fd7332746c90dd4
parent 10353 4a4390c59f177bddec9ba12d964f5485264f35a9
child 10355 9380baa16de2d059aee48af75481e74635d5fc9f
push idunknown
push userunknown
push dateunknown
bugs405512
milestone1.9b3pre
Fix bustage from bug 405512 by removing unneeded |if| check.
widget/src/cocoa/nsChildView.mm
--- a/widget/src/cocoa/nsChildView.mm
+++ b/widget/src/cocoa/nsChildView.mm
@@ -2452,26 +2452,24 @@ NSEvent* gLastDragEvent = nil;
       // if we're dealing with menus, we probably have submenus and
       // we don't want to rollup if the clickis in a parent menu of
       // the current submenu
       nsCOMPtr<nsIMenuRollup> menuRollup;
       menuRollup = (do_QueryInterface(gRollupListener));
       if (menuRollup) {
         nsAutoTArray<nsIWidget*, 5> widgetChain;
         menuRollup->GetSubmenuWidgetChain(&widgetChain);
-        if (widgetChain) {
-          for (PRUint32 i = 0; i < widgetChain.Length(); i++) {
-            nsIWidget* widget = widgetChain[i];
-            NSWindow* currWindow = (NSWindow*)widget->GetNativeData(NS_NATIVE_WINDOW);
-            if (nsCocoaUtils::IsEventOverWindow(theEvent, currWindow)) {
-              rollup = PR_FALSE;
-              break;
-            }
-          } // foreach parent menu widget
-        }
+        for (PRUint32 i = 0; i < widgetChain.Length(); i++) {
+          nsIWidget* widget = widgetChain[i];
+          NSWindow* currWindow = (NSWindow*)widget->GetNativeData(NS_NATIVE_WINDOW);
+          if (nsCocoaUtils::IsEventOverWindow(theEvent, currWindow)) {
+            rollup = PR_FALSE;
+            break;
+          }
+        } // foreach parent menu widget
       } // if rollup listener knows about menus
 
       // if we've determined that we should still rollup, do it.
       if (rollup) {
         gRollupListener->Rollup(nsnull);
         retVal = PR_TRUE;
       }
     }