diff --git a/src/nsterm.m b/src/nsterm.m index 120442cda25..a5273e93272 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -446,10 +446,11 @@ - (unsigned long)unsignedLong /* This is a piece of code which is common to all the event handling methods. Maybe it should even be a function. */ #define EV_TRAILER(e) \ - { \ - XSETFRAME (emacs_event->frame_or_window, emacsframe); \ - EV_TRAILER2 (e); \ - } + if (emacs_event->kind != NO_EVENT) \ + { \ + XSETFRAME (emacs_event->frame_or_window, emacsframe); \ + EV_TRAILER2 (e); \ + } #define EV_TRAILER2(e) \ { \