diff --git a/atom/browser/common_web_contents_delegate_mac.mm b/atom/browser/common_web_contents_delegate_mac.mm index f473c1406216..fc40a7d6d6c2 100644 --- a/atom/browser/common_web_contents_delegate_mac.mm +++ b/atom/browser/common_web_contents_delegate_mac.mm @@ -25,8 +25,7 @@ void CommonWebContentsDelegate::HandleKeyboardEvent( NSWindow* window = event.os_event.window; if (window && [window isKindOfClass:[AtomNSWindow class]]) { - AtomNSWindow* native_window = static_cast(window); - [native_window redispatchKeyEvent:event.os_event]; + [((AtomNSWindow*)window) redispatchKeyEvent:event.os_event]; } }