diff options
author | Tim Janik <timj@gimp.org> | 1998-01-26 01:20:14 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-01-26 01:20:14 +0000 |
commit | f734007af4cba93349a969b50ea1d44bfa0e95a3 (patch) | |
tree | 1acb1a364b6b2c3fb1e4bf14a6e9f5ebaa8b0a37 /gdk/gdkpixmap.c | |
parent | 63f6c689ff1ac6f28a412bf8a9861e9e7541be55 (diff) | |
download | gdk-pixbuf-f734007af4cba93349a969b50ea1d44bfa0e95a3.tar.gz |
added a bunch of checks for window != NULL and private->destroyed. (don't
Mon Jan 26 02:15:29 1998 Tim Janik <timj@gimp.org>
* gdk/gdkdraw.c:
* gdk/gdkgc.c:
* gdk/gdkimage.c:
* gdk/gdkinput.c:
* gdk/gdkpixmap.c:
* gdk/gdkproperty.c:
* gdk/gdkselection.c:
* gdk/gdkwindow.c: added a bunch of checks for window != NULL and
private->destroyed.
(don't trust this cvs commit message, i didn't modify that many files!)
Diffstat (limited to 'gdk/gdkpixmap.c')
-rw-r--r-- | gdk/gdkpixmap.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c index e0f4d580b..48b072b91 100644 --- a/gdk/gdkpixmap.c +++ b/gdk/gdkpixmap.c @@ -46,14 +46,16 @@ gdk_pixmap_new (GdkWindow *window, if (!window) window = (GdkWindow*) &gdk_root_parent; + window_private = (GdkWindowPrivate*) window; + if (window_private->destroyed) + return NULL; + if (depth == -1) gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth); private = g_new (GdkWindowPrivate, 1); pixmap = (GdkPixmap*) private; - window_private = (GdkWindowPrivate*) window; - private->xdisplay = window_private->xdisplay; private->window_type = GDK_WINDOW_PIXMAP; private->xwindow = XCreatePixmap (private->xdisplay, window_private->xwindow, @@ -87,11 +89,13 @@ gdk_bitmap_create_from_data (GdkWindow *window, if (!window) window = (GdkWindow*) &gdk_root_parent; + window_private = (GdkWindowPrivate*) window; + if (window_private->destroyed) + return NULL; + private = g_new (GdkWindowPrivate, 1); pixmap = (GdkPixmap*) private; - window_private = (GdkWindowPrivate*) window; - private->parent = NULL; private->xdisplay = window_private->xdisplay; private->window_type = GDK_WINDOW_PIXMAP; @@ -132,14 +136,16 @@ gdk_pixmap_create_from_data (GdkWindow *window, if (!window) window = (GdkWindow*) &gdk_root_parent; + window_private = (GdkWindowPrivate*) window; + if (window_private->destroyed) + return NULL; + if (depth == -1) gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth); private = g_new (GdkWindowPrivate, 1); pixmap = (GdkPixmap*) private; - window_private = (GdkWindowPrivate*) window; - private->parent = NULL; private->xdisplay = window_private->xdisplay; private->window_type = GDK_WINDOW_PIXMAP; |