diff options
author | Roland Baer <roland@Vista.(none)> | 2007-11-05 13:36:18 +0300 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2007-11-05 14:32:51 +0100 |
commit | 93cce281449f7d97d1fedfd128acad37d9a2b3f3 (patch) | |
tree | e4178b9aeeb549eac21f89c2c1c8cbe0a8514045 | |
parent | 892d5953e4be028a1e72bd67a9fe69b64a3dbb8e (diff) | |
download | group-93cce281449f7d97d1fedfd128acad37d9a2b3f3.tar.gz group-93cce281449f7d97d1fedfd128acad37d9a2b3f3.tar.bz2 |
Added missing NULL checks
-rw-r--r-- | cairo.c | 2 | ||||
-rw-r--r-- | group.c | 4 | ||||
-rw-r--r-- | tab.c | 3 |
3 files changed, 9 insertions, 0 deletions
@@ -98,6 +98,8 @@ groupCreateCairoLayer (CompScreen *s, layer = malloc (sizeof (GroupCairoLayer)); + if (!layer) + return NULL; layer->surface = NULL; layer->cairo = NULL; @@ -639,8 +639,12 @@ groupAddWindowToGroup (CompWindow *w, { /* create new group */ GroupSelection *g = malloc (sizeof (GroupSelection)); + if (!g) + return; g->windows = malloc (sizeof (CompWindow *)); + if (!g->windows) + return; g->windows[0] = w; g->screen = w->screen; @@ -2175,6 +2175,9 @@ void groupCreateSlot (GroupSelection *group, return; slot = malloc (sizeof (GroupTabBarSlot)); + if (!slot) + return; + slot->window = w; slot->region = XCreateRegion (); |