X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fanalogtv.c;h=bb334650f9675b3bca2bec6da2a7b6f86c96e0e2;hb=5f1f12f2a37da634000f96d18d59cc73a8814ef7;hp=f271d26b0682b7b8c4e635ccb118b42fcb553bb8;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/analogtv.c b/hacks/analogtv.c index f271d26b..bb334650 100644 --- a/hacks/analogtv.c +++ b/hacks/analogtv.c @@ -494,6 +494,7 @@ analogtv_release(analogtv *it) it->gc=NULL; if (it->n_colors) XFreeColors(it->dpy, it->colormap, it->colors, it->n_colors, 0L); it->n_colors=0; + free(it); } @@ -1030,11 +1031,11 @@ analogtv_setup_levels(analogtv *it, double avgheight) it->leveltable[height][0].index=0; } if (avgheight>=5) { - it->leveltable[height][height-1].index=0; + if (height >= 1) it->leveltable[height][height-1].index=0; } if (avgheight>=7) { it->leveltable[height][1].index=1; - it->leveltable[height][height-2].index=1; + if (height >= 2) it->leveltable[height][height-2].index=1; } for (i=0; i