summaryrefslogtreecommitdiff
path: root/source/xap/gv/gv-resource.patch
blob: b1352e79fa18bede0866e0dd0615cce1eb5d0eaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- gv-3.7.4/src/main.c-	2012-04-01 10:43:24.000000000 -0400
+++ gv-3.7.4/src/main.c	2013-04-12 18:39:47.578033642 -0400
@@ -1449,7 +1449,7 @@
   if (s) gv_gs_arguments = s;
 
   s = resource_getResource(db,gv_class,gv_name,"gsSafeDir",NULL);
-  if (!strcasecmp(s,"true"))  gv_gs_safeDir = 1; else gv_gs_safeDir = 0;
+  if (s && !strcasecmp(s,"true"))  gv_gs_safeDir = 1; else gv_gs_safeDir = 0;
 
   s = resource_getResource(db,gv_class,gv_name,"gsSafer",NULL);
   if (s && !strcasecmp(s,"true"))  gv_gs_safer = 1; else gv_gs_safer = 0;
@@ -1468,13 +1468,13 @@
   }
 
   s = resource_getResource(db,gv_class,gv_name,"infoVerbose",NULL);
-  if (!strcasecmp(s, "Silent"))      gv_infoVerbose=0;
-  else if (!strcasecmp(s, "Errors")) gv_infoVerbose=1;
-  else if (!strcasecmp(s, "All"))    gv_infoVerbose=2;
+  if (!s || !strcasecmp(s, "Errors")) gv_infoVerbose=1;
+  else if (!strcasecmp(s, "Silent"))  gv_infoVerbose=0;
+  else if (!strcasecmp(s, "All"))     gv_infoVerbose=2;
   else gv_infoVerbose = 1;
 
   s = resource_getResource(db,gv_class,gv_name,"xinerama",NULL);
-  if (!strcasecmp(s, "Off"))      gv_xinerama=0;
+  if (!s || !strcasecmp(s, "Off"))    gv_xinerama=0;
   else if (!strcasecmp(s, "On")) gv_xinerama=1;
   else if (!strcasecmp(s, "Auto"))    gv_xinerama=-1;
   else gv_xinerama = 0;