]> Pileus Git - ~andy/gtk/commitdiff
destroy the XIM only if it exists. While the code does look safe in
authorMichael Natterer <mitch@imendio.com>
Fri, 26 Jan 2007 13:31:35 +0000 (13:31 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Fri, 26 Jan 2007 13:31:35 +0000 (13:31 +0000)
2007-01-26  Michael Natterer  <mitch@imendio.com>

* modules/input/gtkimcontextxim.c (gtk_im_context_xim_finalize):
destroy the XIM only if it exists. While the code does look safe
in general, there can be corner cases where the "reconnecting"
boolean being FALSE does not correspond to the XIM being
allocated (fix taken from maemo-gtk).

svn path=/trunk/; revision=17218

ChangeLog
modules/input/gtkimcontextxim.c

index d4ee62567c948380fda746c50cbff5e48f3d1df7..176db033f94e08cfca3bb4dc8207521cb931f638 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-01-26  Michael Natterer  <mitch@imendio.com>
+
+       * modules/input/gtkimcontextxim.c (gtk_im_context_xim_finalize):
+       destroy the XIM only if it exists. While the code does look safe
+       in general, there can be corner cases where the "reconnecting"
+       boolean being FALSE does not correspond to the XIM being
+       allocated (fix taken from maemo-gtk).
+
 Fri Jan 26 13:07:07 2007  Tim Janik  <timj@imendio.com>
 
        * gtk/gtkstyle.c (draw_insertion_cursor): clamp cursor coordinates to
index 68f6ec4f9d91abf6e0d36c0efaf0d3b892b80a78..f6f7bd947fda7c5deac3b8c6b7d95e57bada1c4f 100644 (file)
@@ -577,7 +577,7 @@ gtk_im_context_xim_finalize (GObject *obj)
                                            xim_instantiate_callback,
                                            (XPointer)context_xim->im_info);
        }
-      else
+      else if (context_xim->im_info->im)
        {
          XIMCallback im_destroy_callback;