diff options
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 20 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 2 |
2 files changed, 6 insertions, 16 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 1059e37704a..622556943c9 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -722,9 +722,7 @@ static void gpencil_boundaryfill_area(tGPDfill *tgpf) } /* release ibuf */ - if (ibuf) { - BKE_image_release_ibuf(tgpf->ima, ibuf, lock); - } + BKE_image_release_ibuf(tgpf->ima, ibuf, lock); tgpf->ima->id.tag |= LIB_TAG_DOIT; /* free temp stack data */ @@ -760,9 +758,7 @@ static void gpencil_set_borders(tGPDfill *tgpf, const bool transparent) } /* release ibuf */ - if (ibuf) { - BKE_image_release_ibuf(tgpf->ima, ibuf, lock); - } + BKE_image_release_ibuf(tgpf->ima, ibuf, lock); tgpf->ima->id.tag |= LIB_TAG_DOIT; } @@ -794,9 +790,7 @@ static void gpencil_invert_image(tGPDfill *tgpf) } /* release ibuf */ - if (ibuf) { - BKE_image_release_ibuf(tgpf->ima, ibuf, lock); - } + BKE_image_release_ibuf(tgpf->ima, ibuf, lock); tgpf->ima->id.tag |= LIB_TAG_DOIT; } @@ -846,9 +840,7 @@ static void gpencil_erase_processed_area(tGPDfill *tgpf) } /* release ibuf */ - if (ibuf) { - BKE_image_release_ibuf(tgpf->ima, ibuf, lock); - } + BKE_image_release_ibuf(tgpf->ima, ibuf, lock); tgpf->ima->id.tag |= LIB_TAG_DOIT; } @@ -1062,9 +1054,7 @@ static void gpencil_get_outline_points(tGPDfill *tgpf, const bool dilate) } /* release ibuf */ - if (ibuf) { - BKE_image_release_ibuf(tgpf->ima, ibuf, lock); - } + BKE_image_release_ibuf(tgpf->ima, ibuf, lock); } /* get z-depth array to reproject on surface */ diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index c3ac33063af..7c796f7b7a1 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -3207,7 +3207,7 @@ bGPDstroke *ED_gpencil_stroke_join_and_trim( bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps, bGPDstroke *gps_dst, const int pt_index) { if ((gps->totpoints < 1) || (gps_dst->totpoints < 1)) { - return false; + return NULL; } BLI_assert(pt_index >= 0 && pt_index < gps_dst->totpoints); |