From 606f3c74d36bbbe6b7e3aeae962176a89355a552 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 18 Mar 2019 13:55:26 +0100 Subject: Fix T62643: ID user decrement error, likely related to custom material PointerProperty. We are in a totally out-of-main context here, so no refcounting of any ID... Note that this whole 'render preview' area could use some refactor with modern ID management API, but that would go way beyond a mere bugfix, and it is not the time to do such things. --- source/blender/editors/render/render_preview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/render/render_preview.c') diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 9599a7bdbee..0b0acbffec9 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -61,6 +61,7 @@ #include "BKE_idprop.h" #include "BKE_image.h" #include "BKE_icons.h" +#include "BKE_library.h" #include "BKE_light.h" #include "BKE_layer.h" #include "BKE_main.h" @@ -923,7 +924,7 @@ static void shader_preview_free(void *customdata) /* get rid of copied ID */ properties = IDP_GetProperties(sp->id_copy, false); if (properties) { - IDP_FreeProperty(properties); + IDP_FreeProperty_ex(properties, false); MEM_freeN(properties); } switch (GS(sp->id_copy->name)) { -- cgit v1.2.3