From e3b79c641e04a9e8681e7e27db3db3e4beec0fa4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Thu, 15 Sep 2022 15:50:12 +0200 Subject: [PATCH] Fix crash in GC on macOS (bug#57751) * src/nsterm.m ([EmacsView windowDidMove:]): Initialize input_event. --- src/nsterm.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index b8b4e66cd11..44979c7c04e 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7901,7 +7901,6 @@ ns_create_font_panel_buttons (id target, SEL select, SEL cancel_action) NSRect r = [win frame]; NSArray *screens = [NSScreen screens]; NSScreen *screen = [screens objectAtIndex: 0]; - struct input_event ie; NSTRACE ("[EmacsView windowDidMove:]"); @@ -7917,6 +7916,8 @@ ns_create_font_panel_buttons (id target, SEL select, SEL cancel_action) if (emacs_event) { + struct input_event ie; + EVENT_INIT (ie); ie.kind = MOVE_FRAME_EVENT; XSETFRAME (ie.frame_or_window, emacsframe); XSETINT (ie.x, emacsframe->left_pos); -- 2.39.2