]> Pileus Git - ~andy/gtk/commitdiff
fix missing hash table initialization.
authorTim Janik <timj@gtk.org>
Tue, 6 Dec 2005 10:40:09 +0000 (10:40 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 6 Dec 2005 10:40:09 +0000 (10:40 +0000)
Tue Dec  6 11:37:59 2005  Tim Janik  <timj@gtk.org>

        * gdk/gdkevents.c (gdk_event_new): fix missing hash table
        initialization.

ChangeLog
ChangeLog.pre-2-10
gdk/gdkevents.c

index 22ed630aa6af49977798f29835cbd0aa3355e722..71cd1bf0336a47e5f8b28fa55833e96d61467366 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Dec  6 11:37:59 2005  Tim Janik  <timj@gtk.org>
+
+       * gdk/gdkevents.c (gdk_event_new): fix missing hash table 
+       initialization.
+
 Tue Dec  6 10:32:17 2005  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkstatusbar.c: ported memchunk uses to g_slice, so the code
index 22ed630aa6af49977798f29835cbd0aa3355e722..71cd1bf0336a47e5f8b28fa55833e96d61467366 100644 (file)
@@ -1,3 +1,8 @@
+Tue Dec  6 11:37:59 2005  Tim Janik  <timj@gtk.org>
+
+       * gdk/gdkevents.c (gdk_event_new): fix missing hash table 
+       initialization.
+
 Tue Dec  6 10:32:17 2005  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkstatusbar.c: ported memchunk uses to g_slice, so the code
index dc85f9eb9f37dc1deb0b20e60d8f117255220664..ac6cd59d2eba6544f0f8d0f90b8e9273899ad327 100644 (file)
@@ -274,6 +274,9 @@ gdk_event_new (GdkEventType type)
   GdkEventPrivate *new_private;
   GdkEvent *new_event;
   
+  if (!event_hash)
+    event_hash = g_hash_table_new (g_direct_hash, NULL);
+
   new_private = g_slice_new0 (GdkEventPrivate);
   
   new_private->flags = 0;
@@ -485,7 +488,7 @@ gdk_event_free (GdkEvent *event)
     }
 
   g_hash_table_remove (event_hash, event);
-  g_slice_free (GdkEventPrivate, event);
+  g_slice_free (GdkEventPrivate, (GdkEventPrivate*) event);
 }
 
 /**