From: Dana Jansens Date: Mon, 14 Apr 2003 22:39:47 +0000 (+0000) Subject: fix a seg from ignoreing PROP_GETSS failure X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=cb6840788b26fa1560f6dca93bd9af42d00c9b70;p=chaz%2Fopenbox fix a seg from ignoreing PROP_GETSS failure --- diff --git a/openbox/screen.c b/openbox/screen.c index 82fb4750..2b4ece3e 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -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);