gdkevents-win32.c: Fix GDK_SETTING event notification on IME change

We need to call g_strdup() on the name that we pass in for notifying the
GDK_SETTING event so that when we do gdk_event_free() later we will not
get a crash (stack corruption) that results from attempting to g_free()
something that is not dynamically allocated.
This commit is contained in:
Chun-wei Fan 2018-12-10 14:47:17 +08:00
parent aeec73f53f
commit 013b9cbc1f

View File

@ -2256,7 +2256,7 @@ gdk_settings_notify (GdkWindow *window,
new_event->setting.window = window;
new_event->setting.send_event = FALSE;
new_event->setting.action = action;
new_event->setting.name = (char*) name;
new_event->setting.name = g_strdup (name);
_gdk_win32_append_event (new_event);
}