diff options
author | Tim Janik <timj@gtk.org> | 1998-07-04 15:31:30 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-07-04 15:31:30 +0000 |
commit | 90408c4641e6493913eb859a67b3965bca259558 (patch) | |
tree | acdf9e671a8ca1307bb24099ce90ad59d1ac3185 /gdk/gdkselection.c | |
parent | c2eb7c28fe37ac83facf071451c4c2699e76cf1d (diff) | |
download | gtk+-90408c4641e6493913eb859a67b3965bca259558.tar.gz |
changed reversed_[12] to reserved_[12] in gtk_*_get_type functions.
Sat Jul 4 13:16:24 1998 Tim Janik <timj@gtk.org>
* gtk/*.c: changed reversed_[12] to reserved_[12] in gtk_*_get_type
functions.
* gdk/gdkwindow.c:
* gdk/gdkvisual.c: check for some pointer values to be != NULL, prior
to XFree() calls.
Diffstat (limited to 'gdk/gdkselection.c')
-rw-r--r-- | gdk/gdkselection.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gdk/gdkselection.c b/gdk/gdkselection.c index f1abc01cfb..fb89a3d85e 100644 --- a/gdk/gdkselection.c +++ b/gdk/gdkselection.c @@ -109,6 +109,7 @@ gdk_selection_property_get (GdkWindow *requestor, if (private->destroyed) return 0; + t = NULL; XGetWindowProperty (private->xdisplay, private->xwindow, gdk_selection_property, 0, 0, False, AnyPropertyType, &prop_type, &prop_format, @@ -125,7 +126,11 @@ gdk_selection_property_get (GdkWindow *requestor, return 0; } - XFree (t); + if (t) + { + t = NULL; + XFree (t); + } /* Add on an extra byte to handle null termination. X guarantees that t will be 1 longer than nbytes and null terminated */ @@ -144,7 +149,8 @@ gdk_selection_property_get (GdkWindow *requestor, { *data = g_new (guchar, length); memcpy (*data, t, length); - XFree (t); + if (t) + XFree (t); return length-1; } else @@ -205,6 +211,8 @@ gdk_text_property_to_text_list (GdkAtom encoding, gint format, void gdk_free_text_list (gchar **list) { + g_return_if_fail (list != NULL); + XFreeStringList (list); } |