summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2018-12-10 14:47:17 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2018-12-17 12:43:24 +0800
commit013b9cbc1f4322debd0d3040a344bc360bb7d168 (patch)
treee928835a2c98b9bd8899c98c2a3531d246e6fbda
parentaeec73f53f6df7683e3fddae4563787a3a0457dc (diff)
downloadgtk+-gtk-3-24.ime-event.fixes.tar.gz
gdkevents-win32.c: Fix GDK_SETTING event notification on IME changegtk-3-24.ime-event.fixes
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.
-rw-r--r--gdk/win32/gdkevents-win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index a2698e3cfc..7c415377e5 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -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);
}