diff options
author | Jeff Garzik <jgarzik@src.gnome.org> | 1999-01-21 06:24:09 +0000 |
---|---|---|
committer | Jeff Garzik <jgarzik@src.gnome.org> | 1999-01-21 06:24:09 +0000 |
commit | 8dc58cb2d354ff31f17c707fabf2f6d078b40c17 (patch) | |
tree | f9d873a5e3b7b54586243edaafceecf45c714eca /gdk/gdkdnd.c | |
parent | e7b04a53ac790ad6fda6b05a2eb0a71b2a2d0818 (diff) | |
download | gtk+-8dc58cb2d354ff31f17c707fabf2f6d078b40c17.tar.gz |
Move not-null assertion before pointer de-ref.
* gdk/gdkdnd.c (gdk_drag_context_unref):
Move not-null assertion before pointer de-ref.
* gdk/gdkevents.c (gdk_event_queue_find_first):
Fix infinite loop bug. Someone should look at this further to
make sure the events_pending tests are correct.
Diffstat (limited to 'gdk/gdkdnd.c')
-rw-r--r-- | gdk/gdkdnd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c index c3fdaa58be..b2653628a5 100644 --- a/gdk/gdkdnd.c +++ b/gdk/gdkdnd.c @@ -131,10 +131,11 @@ void gdk_drag_context_unref (GdkDragContext *context) { GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; - private->ref_count--; - + g_return_if_fail (context != NULL); + private->ref_count--; + if (private->ref_count == 0) { g_dataset_destroy (private); |