mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 06:10:17 +01:00
Check for zero before freeing region
This commit is contained in:
parent
5d64efdbb8
commit
cd2f50e6c4
1 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue