git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16037
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
long keyval = wxMacTranslateKey(keychar, keycode) ;
wxWindow* focus = wxWindow::FindFocus() ;
long keyval = wxMacTranslateKey(keychar, keycode) ;
wxWindow* focus = wxWindow::FindFocus() ;
- if ( wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
+ if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
{
// was handled internally
result = noErr ;
{
// was handled internally
result = noErr ;
long keyval = wxMacTranslateKey(keychar, keycode) ;
wxWindow* focus = wxWindow::FindFocus() ;
long keyval = wxMacTranslateKey(keychar, keycode) ;
wxWindow* focus = wxWindow::FindFocus() ;
- if ( wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
+ if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
{
// was handled internally
result = noErr ;
{
// was handled internally
result = noErr ;