X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Flavalite.c;h=8c2d800c2f4b353daeee0d39ab4bfa430dc39943;hb=6cee540bdbb571485cd5e519f89f389faebd0495;hp=8c653287321ab0a207fc5cc5aab7e94d6f928d24;hpb=723c9eeee862766a1534b2ce17b78adbfac1c3be;p=xscreensaver diff --git a/hacks/glx/lavalite.c b/hacks/glx/lavalite.c index 8c653287..8c2d800c 100644 --- a/hacks/glx/lavalite.c +++ b/hacks/glx/lavalite.c @@ -899,7 +899,7 @@ max_bottle_radius (lavalite_configuration *bp) static GLfloat bottle_radius_at (lavalite_configuration *bp, GLfloat z) { - GLfloat topz = -999, botz = -999, topr, botr; + GLfloat topz = -999, botz = -999, topr = 0, botr = 0; lamp_geometry *slice; GLfloat ratio; @@ -1237,7 +1237,10 @@ animate_lava (ModeInfo *mi) mi->polygon_count = 0; { - double s = 1.0/bp->grid_size; + double s; + if (bp->grid_size == 0) bp->grid_size = 1; /* first time through */ + s = 1.0/bp->grid_size; + glPushMatrix(); glTranslatef (-0.5, -0.5, 0); glScalef (s, s, s);