From b825a95ec311a169d33fe21e28418f11a516c82f Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 6 Mar 2020 17:11:55 +0100 Subject: Cleanup: Image: Move to IDTypeInfo and remove unused BKE API. --- source/blender/editors/gpencil/gpencil_fill.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 44ff11aa84a..cf4ca80a331 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1297,6 +1297,9 @@ static void gpencil_fill_exit(bContext *C, wmOperator *op) if (tgpf->ima) { for (Image *ima = bmain->images.first; ima; ima = ima->id.next) { if (ima == tgpf->ima) { + /* XXX This is super, super suspicious! + * There should NEVER be any need to handle datablocks in Main in such custom code. + * Please change to using BKE_id_free() or similar! */ BLI_remlink(&bmain->images, ima); BKE_image_free(tgpf->ima); MEM_SAFE_FREE(tgpf->ima); -- cgit v1.2.3