/* 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;
children = g_list_prepend (children, child);
}
- XFree (xchildren);
+ if (xchildren)
+ XFree (xchildren);
}
return children;
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);
XSetWMIconName (window_private->xdisplay, window_private->xwindow,
&property);
- XFree(property.value);
+ if (property.value)
+ XFree (property.value);
}
void