Browse Source

viewDidMoveToSuperview may not be implemented

Cheng Zhao 7 years ago
parent
commit
a2c3db666e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      atom/browser/native_window_mac.mm

+ 3 - 1
atom/browser/native_window_mac.mm

@@ -244,7 +244,9 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
     // [BridgedContentView viewDidMoveToSuperview];
     auto original = reinterpret_cast<decltype(&ViewDidMoveToSuperview)>(
         original_view_did_move_to_superview);
-    return original(self, _cmd);
+    if (original)
+      original(self, _cmd);
+    return;
   }
   [self setFrame:[[self superview] bounds]];
 }