X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=hacks%2Fglx%2Fhydrostat.c;h=2254483784460a9111ad392c82ff5556e70bfb24;hb=39809ded547bdbb08207d3e514950425215b4410;hp=85aea634cc5ba141682f5f048dc5293fa36b5d80;hpb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c;p=xscreensaver diff --git a/hacks/glx/hydrostat.c b/hacks/glx/hydrostat.c index 85aea634..22544837 100644 --- a/hacks/glx/hydrostat.c +++ b/hacks/glx/hydrostat.c @@ -33,7 +33,7 @@ "*wireframe: False \n" \ "*suppressRotationAnimation: True\n" \ -# define refresh_hydrostat 0 +# define release_hydrostat 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -647,14 +647,7 @@ init_hydrostat (ModeInfo *mi) hydrostat_configuration *bp; int i; - if (!bps) { - bps = (hydrostat_configuration *) - calloc (MI_NUM_SCREENS(mi), sizeof (hydrostat_configuration)); - if (!bps) { - fprintf(stderr, "%s: out of memory\n", progname); - exit(1); - } - } + MI_INIT (mi, bps); bp = &bps[MI_SCREEN(mi)]; @@ -764,10 +757,12 @@ draw_hydrostat (ModeInfo *mi) ENTRYPOINT void -release_hydrostat (ModeInfo *mi) +free_hydrostat (ModeInfo *mi) { hydrostat_configuration *bp = &bps[MI_SCREEN(mi)]; int i; + if (!bp->squids) + return; for (i = 0; i < MI_COUNT(mi); i++) free_squid (bp->squids[i]); free (bp->squids);