]> Dogcows Code - chaz/openbox/commitdiff
fix a seg from ignoreing PROP_GETSS failure
authorDana Jansens <danakj@orodu.net>
Mon, 14 Apr 2003 22:39:47 +0000 (22:39 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 14 Apr 2003 22:39:47 +0000 (22:39 +0000)
openbox/screen.c

index 82fb4750e1394eeabfec14929d5da7b81393e996..2b4ece3ea7219e34c74fb865ede7404ec0801608 100644 (file)
@@ -378,9 +378,10 @@ void screen_update_desktop_names()
     /* empty the array */
     g_strfreev(screen_desktop_names);
 
-    PROP_GETSS(ob_root, net_desktop_names, utf8, &screen_desktop_names);
-
-    for (i = 0; screen_desktop_names[i] && i <= screen_num_desktops; ++i);
+    if (PROP_GETSS(ob_root, net_desktop_names, utf8, &screen_desktop_names))
+        for (i = 0; screen_desktop_names[i] && i <= screen_num_desktops; ++i);
+    else
+        i = 0;
     if (i <= screen_num_desktops) {
         screen_desktop_names = g_renew(char*, screen_desktop_names,
                                        screen_num_desktops + 1);
This page took 0.025619 seconds and 4 git commands to generate.