http://ftp.x.org/contrib/applications/xscreensaver-3.18.tar.gz
[xscreensaver] / utils / visual.c
index 195ef79db8ff1a5092d8c40ccbfbf6beb4afffd4..c37b6baa5e899628f12ff94e18398190a9bb1b33 100644 (file)
@@ -62,7 +62,7 @@ get_visual (Screen *screen, const char *string, Bool prefer_writable_cells,
     for (tmp = v; *tmp; tmp++)
       if (isupper (*tmp)) *tmp = _tolower (*tmp);
 
-  if (!v)                                        vclass = BEST_VISUAL;
+  if (!v || !*v)                                 vclass = BEST_VISUAL;
   else if (!strcmp (v, "default"))               vclass = DEFAULT_VISUAL;
   else if (!strcmp (v, "best"))                  vclass = BEST_VISUAL;
   else if (!strcmp (v, "mono"))                  vclass = MONO_VISUAL;