diff options
author | Ton Roosendaal <ton@blender.org> | 2011-02-19 17:32:34 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-02-19 17:32:34 +0300 |
commit | 6481921b9ad3d6e50a2aaa2f4a03e2fefcb14a94 (patch) | |
tree | d9e7e3bd73c896fd82e7739889b7b5c187335cca /source | |
parent | e1575e5b58f51ff7788a772a340104ddc4100ce1 (diff) |
Bugfix #26015
A very Bad Bug!
On every draw-object, a function free_old_images() was called which
was freeing "unused" images during renders/bakes
This was a left-over from 2.4x code, missed it altogether.
I'm sure this fix will solve a lot of render crashing... :)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index dc690f45709..8a15f63243c 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -526,6 +526,10 @@ void free_old_images(void) if (U.textimeout == 0 || ctime % U.texcollectrate || ctime == lasttime) return; + /* of course not! */ + if (G.rendering) + return; + lasttime = ctime; ima= G.main->image.first; @@ -2182,10 +2186,7 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r) BLI_unlock_thread(LOCK_IMAGE); } - /* we assuming that if it is not rendering, it's also not multithreaded - * (a somewhat weak assumption) */ - if(G.rendering==0) - tag_image_time(ima); + tag_image_time(ima); return ibuf; } |