Page MenuHome
Paste P535

Fix T52988
ActivePublic

Authored by Sergey Sharybin (sergey) on Oct 4 2017, 1:35 PM.
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 863bce125c5..ad04378cb66 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -1984,9 +1984,11 @@ ImBuf *IMB_colormanagement_imbuf_for_write(ImBuf *ibuf, bool save_as_render, boo
{
ImBuf *colormanaged_ibuf = ibuf;
bool do_colormanagement;
- bool is_movie = BKE_imtype_is_movie(image_format_data->imtype);
- bool requires_linear_float = BKE_imtype_requires_linear_float(image_format_data->imtype);
- bool do_alpha_under = image_format_data->planes != R_IMF_PLANES_RGBA;
+ const bool is_movie = BKE_imtype_is_movie(image_format_data->imtype);
+ const bool requires_linear_float = BKE_imtype_requires_linear_float(image_format_data->imtype);
+ const bool do_alpha_under = (ibuf->rect_float != NULL)
+ ? (image_format_data->planes != R_IMF_PLANES_RGBA)
+ : false;
if (ibuf->rect_float && ibuf->rect &&
(ibuf->userflags & (IB_DISPLAY_BUFFER_INVALID | IB_RECT_INVALID)) != 0)

Event Timeline

Sergey Sharybin (sergey) created this object with edit policy "Administrators".