]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix building on Mac
authorCheng Zhao <zcbenz@gmail.com>
Fri, 28 Nov 2014 11:50:10 +0000 (19:50 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 28 Nov 2014 11:50:10 +0000 (19:50 +0800)
atom/browser/api/atom_api_menu_mac.mm

index e63b07324bcead5119af2221109cf63674183662..b61d1c69a87cf36ddd0b263bc6f0cb924eeb64dc 100644 (file)
@@ -58,10 +58,10 @@ void MenuMac::PopupAt(Window* window, int x, int y) {
   if (!web_contents)
     return;
 
-  NSView* view = web_contents->GetContentNativeView();
-  NSMenu* menu = [menu_controller menu];
   base::scoped_nsobject<AtomMenuController> menu_controller(
       [[AtomMenuController alloc] initWithModel:model_.get()]);
+  NSMenu* menu = [menu_controller menu];
+  NSView* view = web_contents->GetContentNativeView();
 
   // Show the menu.
   [menu popUpMenuPositioningItem:[menu itemAtIndex:0]