diff options
Diffstat (limited to 'src/desktop.c')
-rw-r--r-- | src/desktop.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/desktop.c b/src/desktop.c index 44c23f0..80f75f7 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -122,14 +122,13 @@ vwm_desktop_t * vwm_desktop_create(vwm_t *vwm, char *name) { vwm_desktop_t *desktop; - desktop = malloc(sizeof(vwm_desktop_t)); + desktop = calloc(1, sizeof(vwm_desktop_t)); if (desktop == NULL) { VWM_PERROR("Failed to allocate desktop"); goto _fail; } desktop->name = name == NULL ? name : strdup(name); - desktop->focused_window = NULL; list_add_tail(&desktop->desktops, &vwm->desktops); list_add_tail(&desktop->desktops_mru, &vwm->desktops_mru); |