diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-21 05:07:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-21 05:07:26 +0300 |
commit | 2ef296dc4c8808dbf0a81d4b4df198de66d41826 (patch) | |
tree | 0a010d91c50f7aa10a11cf095bee78aa145721a6 /source/blender/editors/render | |
parent | 54dd0f57cfd0c228c6a5823f9a3e28d34712a6d7 (diff) |
bugfix [#26118] Getting 'Error Totblock' when using sub-properties from a PointerProperty
blender wasnt freeing ID-Properties when freeing the material copy.
Checked that this isnt a problem for other preview types - texture/world/lamp.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_preview.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index d635a799ec1..eff07231805 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -68,6 +68,7 @@ #include "BKE_main.h" #include "BKE_material.h" #include "BKE_node.h" +#include "BKE_idprop.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" @@ -1078,12 +1079,19 @@ static void shader_preview_free(void *customdata) ShaderPreview *sp= customdata; if(sp->matcopy) { + struct IDProperty *properties; /* node previews */ shader_preview_updatejob(sp); /* get rid of copied material */ BLI_remlink(&pr_main->mat, sp->matcopy); free_material(sp->matcopy); + + properties= IDP_GetProperties((ID *)sp->matcopy, FALSE); + if (properties) { + IDP_FreeProperty(properties); + MEM_freeN(properties); + } MEM_freeN(sp->matcopy); } |