ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-5.01.tar.gz
[xscreensaver] / hacks / starfish.c
index f013482baff954bd5088628566f9d16f68836df5..4390b2da118550d5bdbf9aac68393ee559d9e20a 100644 (file)
@@ -345,6 +345,8 @@ reset_starfish (struct state *st)
       if (st->colors)
        free (st->colors);
       st->colors = 0;
+      XFreeGC (st->dpy, st->gc);
+      st->gc = 0;
     }
 
   st->ncolors = get_integer_resource (st->dpy, "colors", "Colors");
@@ -479,6 +481,8 @@ starfish_draw (Display *dpy, Window window, void *closure)
             s = reset_starfish (st);
           else
             s = make_window_starfish (st);
+
+         st->starfish = s;
         }
     }