summaryrefslogtreecommitdiff
path: root/gdk/gdkdnd.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@src.gnome.org>1999-01-21 06:24:09 +0000
committerJeff Garzik <jgarzik@src.gnome.org>1999-01-21 06:24:09 +0000
commit8dc58cb2d354ff31f17c707fabf2f6d078b40c17 (patch)
treef9d873a5e3b7b54586243edaafceecf45c714eca /gdk/gdkdnd.c
parente7b04a53ac790ad6fda6b05a2eb0a71b2a2d0818 (diff)
downloadgtk+-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.c5
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);