diff options
-rw-r--r-- | src/cairo-directfb-surface.c | 3 |
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) { |