Bugfix #8911
authorTon Roosendaal <ton@blender.org>
Thu, 9 Oct 2008 10:59:48 +0000 (10:59 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 9 Oct 2008 10:59:48 +0000 (10:59 +0000)
Image counter can be set to zero when unlinking images, whilst they can
be in use for texture. This is a temporary solution to prevent errors!

(Now image unlinking doesn't set zero users anymore)

source/blender/src/buttons_shading.c

index 056ecd5d36ccf5ffd7220d70fb9332ac2a887ad5..989684895c8cf0bb1406e63bf8946dcd7dd4633f 100644 (file)
@@ -862,7 +862,9 @@ static void image_unlink_cb(void *ima_pp_v, void *unused)
        
        if(ima_pp && *ima_pp) {
                Image *ima= *ima_pp;
-               ima->id.us--;
+               /* (for time being, texturefaces are no users, conflict in design...) */
+               if(ima->id.us>1)
+                       ima->id.us--;
                *ima_pp= NULL;
        }
 }