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:
@ -2256,7 +2256,7 @@ gdk_settings_notify (GdkWindow *window,
|
|||||||
new_event->setting.window = window;
|
new_event->setting.window = window;
|
||||||
new_event->setting.send_event = FALSE;
|
new_event->setting.send_event = FALSE;
|
||||||
new_event->setting.action = action;
|
new_event->setting.action = action;
|
||||||
new_event->setting.name = (char*) name;
|
new_event->setting.name = g_strdup (name);
|
||||||
|
|
||||||
_gdk_win32_append_event (new_event);
|
_gdk_win32_append_event (new_event);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user