Size screen_physical_size;
gboolean screen_showing_desktop;
DesktopLayout screen_desktop_layout;
-char **screen_desktop_names;
+char **screen_desktop_names = NULL;
static Rect *area = NULL;
static Strut *strut = NULL;
screen_resize();
/* set the names */
- screen_desktop_names = g_new0(char*,
- g_slist_length(config_desktops_names) + 1);
+ screen_desktop_names = g_new(char*,
+ g_slist_length(config_desktops_names) + 1);
for (i = 0, it = config_desktops_names; it; ++i, it = it->next)
screen_desktop_names[i] = it->data; /* dont strdup */
+ screen_desktop_names[i] = NULL;
PROP_SETSS(ob_root, net_desktop_names, screen_desktop_names);
g_free(screen_desktop_names); /* dont free the individual strings */
screen_desktop_names = NULL;
/* empty the array */
g_strfreev(screen_desktop_names);
+ screen_desktop_names = NULL;
if (PROP_GETSS(ob_root, net_desktop_names, utf8, &screen_desktop_names))
for (i = 0; screen_desktop_names[i] && i <= screen_num_desktops; ++i);