X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fdistort.c;h=b2411fc7327fb88ac7939afe33c2b404fa44ed7e;hp=92cc0de32b7e801369ff93b5916e32cb084fcc11;hb=ff35d056d723c9a5ffe728dbba5f1c25e141be04;hpb=b81f521c5ad7022ac12db18ca8fcdd9fb063831e diff --git a/hacks/distort.c b/hacks/distort.c index 92cc0de3..b2411fc7 100644 --- a/hacks/distort.c +++ b/hacks/distort.c @@ -1,5 +1,5 @@ /* -*- mode: C; tab-width: 4 -*- - * xscreensaver, Copyright (c) 1992-2008 Jamie Zawinski + * xscreensaver, Copyright (c) 1992-2013 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -785,8 +785,9 @@ distort_reshape (Display *dpy, Window window, void *closure, XGetWindowAttributes (st->dpy, st->window, &st->xgwa); /* XClearWindow (dpy, window); */ /* Why doesn't this work? */ - XPutImage (st->dpy, st->window, st->gc, st->orig_map, - 0, 0, st->orig_map->width, st->orig_map->height, 0, 0); + if (st->orig_map) /* created in distort_finish_loading, might be early */ + XPutImage (st->dpy, st->window, st->gc, st->orig_map, + 0, 0, st->orig_map->width, st->orig_map->height, 0, 0); } static Bool