Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-03-18 15:55:26 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-03-18 15:57:07 +0300
commit606f3c74d36bbbe6b7e3aeae962176a89355a552 (patch)
tree4414670c3e5275abbb66811e37507ad88e9e1025 /source/blender/editors/render/render_preview.c
parent2b79f274e38b10bd28bae34e98990ae95a0eafc0 (diff)
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.
Diffstat (limited to 'source/blender/editors/render/render_preview.c')
-rw-r--r--source/blender/editors/render/render_preview.c3
1 files changed, 2 insertions, 1 deletions
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)) {