ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-5.01.tar.gz
[xscreensaver] / hacks / critical.c
index 5669304b374df58b38c1bb18d146c3f88d4b5f45..f151925cc19fca86327ad141cb7695243ace400a 100644 (file)
@@ -289,7 +289,8 @@ critical_init (Display *dpy, Window window)
      screens. */
   model_w = 80;
   st->settings.cell_size = st->wattr.width / model_w;
-  model_h = st->wattr.height / st->settings.cell_size;
+  model_h = st->settings.cell_size ?
+    st->wattr.height / st->settings.cell_size : 0;
 
   /* Construct the initial model state. */