summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Emmel <memmel@debian.localdomain>2006-07-20 23:01:06 -0700
committerMichael Emmel <memmel@debian.localdomain>2006-07-20 23:01:06 -0700
commitcd2f50e6c421d35c3d5b0d76ed0fdd03a033b2c2 (patch)
treee1388b8c248013762b82e0fe874346eb221cc274
parent5d64efdbb8fc4e17d4fa44d21068870cd2aea7ce (diff)
Check for zero before freeing region
-rw-r--r--src/cairo-directfb-surface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c
index d18f625b..b8d15abf 100644
--- a/src/cairo-directfb-surface.c
+++ b/src/cairo-directfb-surface.c
@@ -1106,7 +1106,8 @@ _cairo_directfb_surface_set_clip_region (void *abstract_surface,
int i;
if (surface->n_clips != n_boxes) {
- free (surface->clips);
+ if( surface->clips )
+ free (surface->clips);
surface->clips = malloc (n_boxes * sizeof(DFBRegion));
if (!surface->clips) {