diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-28 17:45:19 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-28 17:45:19 +0400 |
commit | 46895ab1f2786c2347d0d42b192197fca6d04bf5 (patch) | |
tree | 65545e4cf6feff9d7f1b2059905086ef9d33b7d4 /source/blender/editors/space_image/image_draw.c | |
parent | 95d1d823133f59f71e29200de89d2d15c7f5af89 (diff) |
Attempt to fix #21796: render crash on windows after slots commit.
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 2ba7de356d1..55bec0740ea 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -38,6 +38,7 @@ #include "DNA_screen_types.h" #include "PIL_time.h" +#include "BLI_threads.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" @@ -75,16 +76,19 @@ static void image_verify_buffer_float(SpaceImage *sima, Image *ima, ImBuf *ibuf, NOTE: if float buffer changes, we have to manually remove the rect */ - if(ibuf->rect_float) { - if(ibuf->rect==NULL) { - if (color_manage) { - if (ima && ima->source == IMA_SRC_VIEWER) + if(ibuf->rect_float && ibuf->rect==NULL) { + BLI_lock_thread(LOCK_CUSTOM1); + if(ibuf->rect_float && ibuf->rect==NULL) { + if(color_manage) { + if(ima && ima->source == IMA_SRC_VIEWER) ibuf->profile = IB_PROFILE_LINEAR_RGB; - } else { - ibuf->profile = IB_PROFILE_NONE; } + else + ibuf->profile = IB_PROFILE_NONE; + IMB_rect_from_float(ibuf); } + BLI_unlock_thread(LOCK_CUSTOM1); } } |