Fix #136619: Stereo image saving has wrong colorspace

The logic about which buffer it's going to use for saving is quite confusing.
This simply restores the logic from before 7584ccc28d while still guarding
against accessing null buffers.

Pull Request: https://projects.blender.org/blender/blender/pulls/136659
This commit is contained in:
Brecht Van Lommel
2025-03-28 13:58:03 +01:00
committed by Brecht Van Lommel
parent c42249705b
commit ac5dc94c40
2 changed files with 3 additions and 2 deletions

View File

@@ -622,8 +622,9 @@ ImBuf *IMB_stereo3d_ImBuf(const ImageFormatData *im_format, ImBuf *ibuf_left, Im
ImBuf *ibuf_stereo = nullptr;
Stereo3DData s3d_data = {{nullptr}};
size_t width, height;
const bool is_float = ibuf_left->float_buffer.data && ibuf_right->float_buffer.data;
const bool is_byte = ibuf_left->byte_buffer.data && ibuf_right->byte_buffer.data;
const bool is_float = ibuf_left->float_buffer.data && ibuf_right->float_buffer.data &&
!(is_byte && im_format->depth <= 8);
if (!(is_float || is_byte)) {
return nullptr;