From a798623fff69c992a14f73369876f75e59e7b4ca Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 13 Oct 2012 01:19:23 +0000 Subject: Bugfix [#32865] Usercounts for World Textures not decremented after preview render When adjusting settings for world textures (with Both/World preview modes), every tweak would result in the usercount of the texture increasing. As a result, before long the texture would claim to have over 100 users. Fortunately, this only appeared to be just a cosmetic issue (i.e. no real memory leak here), though it was a bit unsettling. NOTE: this is still a bit glitchy, as now we have flickering when updating texture settings - the texture still temporarily has a second user during preview rendering. --- source/blender/editors/render/render_preview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/render') diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 96276d5eb1b..694d2302fbd 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -809,7 +809,7 @@ static void shader_preview_free(void *customdata) /* get rid of copied world */ BLI_remlink(&pr_main->world, sp->worldcopy); - BKE_world_free_ex(sp->worldcopy, FALSE); + BKE_world_free_ex(sp->worldcopy, TRUE); /* [#32865] - we need to unlink the texture copies, unlike for materials */ properties = IDP_GetProperties((ID *)sp->worldcopy, FALSE); if (properties) { -- cgit v1.2.3