summaryrefslogtreecommitdiff
path: root/gdk/gdkwindow.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-07-04 15:31:30 +0000
committerTim Janik <timj@src.gnome.org>1998-07-04 15:31:30 +0000
commit90408c4641e6493913eb859a67b3965bca259558 (patch)
treeacdf9e671a8ca1307bb24099ce90ad59d1ac3185 /gdk/gdkwindow.c
parentc2eb7c28fe37ac83facf071451c4c2699e76cf1d (diff)
downloadgtk+-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/gdkwindow.c')
-rw-r--r--gdk/gdkwindow.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index ad19209751..6237c780f7 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -476,7 +476,8 @@ gdk_window_foreign_new (guint32 anid)
/* FIXME: This is pretty expensive. Maybe the caller should supply
* the parent */
XQueryTree (gdk_display, anid, &root, &parent, &children, &nchildren);
- XFree (children);
+ if (children)
+ XFree (children);
private->parent = gdk_xid_table_lookup (parent);
parent_private = (GdkWindowPrivate *)private->parent;
@@ -1449,7 +1450,8 @@ gdk_window_get_children (GdkWindow *window)
children = g_list_prepend (children, child);
}
- XFree (xchildren);
+ if (xchildren)
+ XFree (xchildren);
}
return children;
@@ -1525,17 +1527,20 @@ gdk_window_add_colormap_windows (GdkWindow *window)
if (window_private->destroyed)
return;
+ old_windows = NULL;
if (!XGetWMColormapWindows (toplevel_private->xdisplay,
toplevel_private->xwindow,
&old_windows, &count))
{
- old_windows = NULL;
count = 0;
}
for (i = 0; i < count; i++)
if (old_windows[i] == window_private->xwindow)
- return;
+ {
+ XFree (old_windows);
+ return;
+ }
new_windows = g_new (Window, count + 1);
@@ -1949,7 +1954,8 @@ gdk_window_set_icon_name (GdkWindow *window,
XSetWMIconName (window_private->xdisplay, window_private->xwindow,
&property);
- XFree(property.value);
+ if (property.value)
+ XFree (property.value);
}
void