summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuki Iwamoto <iwm@maid.org>2011-06-06 19:33:23 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-06-06 19:33:23 -0400
commit74f57ee04dfd06d4082443dee20cd8a16428d3d9 (patch)
treeeb2051585a049aef9a1dfd8ccf5d9b60321bf05a
parent3ef2e366375226b9d31c536b080759e1da74ca87 (diff)
downloadgtk+-74f57ee04dfd06d4082443dee20cd8a16428d3d9.tar.gz
Avoid a crash in gtk_im_context_ime_reset
When GTK+ runs with inputim-ime.dll module, there is NULL pointer reference. Because "context_ime->client_window" may be NULL in gtk_im_context_ime_reset. https://bugzilla.gnome.org/show_bug.cgi?id=644906
-rw-r--r--modules/input/gtkimcontextime.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/input/gtkimcontextime.c b/modules/input/gtkimcontextime.c
index 786fb9d40e..16f2e7d495 100644
--- a/modules/input/gtkimcontextime.c
+++ b/modules/input/gtkimcontextime.c
@@ -348,6 +348,9 @@ gtk_im_context_ime_reset (GtkIMContext *context)
HWND hwnd;
HIMC himc;
+ if (!context_ime->client_window)
+ return;
+
hwnd = GDK_WINDOW_HWND (context_ime->client_window);
himc = ImmGetContext (hwnd);
if (!himc)