From e0605cca9a09d9d33974f7beea3acbb1741b476e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 16 Apr 2012 14:34:48 +0000 Subject: fix error when a failed thumb overrides a newer good thumbnail. on saving blend file remove failed thumb. --- source/blender/windowmanager/intern/wm_files.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 0ffd9e00f7e..9ffea0e290b 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -805,6 +805,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re /* run this function after because the file cant be written before the blend is */ if (ibuf_thumb) { + IMB_thumb_delete(filepath, THB_FAIL); /* without this a failed thumb overrides */ ibuf_thumb = IMB_thumb_create(filepath, THB_NORMAL, THB_SOURCE_BLEND, ibuf_thumb); IMB_freeImBuf(ibuf_thumb); } -- cgit v1.2.3