- if ( [m_osxView isKindOfClass:[NSButton class]] )
- [(NSButton*)m_osxView setKeyEquivalent: isDefault ? @"\r" : nil ];
+ if ( isDefault && [m_osxView isKindOfClass:[NSButton class]] )
+ // NOTE: setKeyEquivalent: nil will trigger an assert
+ // instead do not call in that case.
+ [(NSButton*)m_osxView setKeyEquivalent: @"\r" ];