mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 21:22:48 +00:00
Fix crash when executing Image.save_jpg_to_buffer
This commit is contained in:
parent
7ebc866418
commit
7355e672ae
@ -162,7 +162,7 @@ static Error _jpgd_save_to_output_stream(jpge::output_stream *p_output_stream, c
|
|||||||
ERR_FAIL_COND_V_MSG(error != OK, error, "Couldn't decompress image.");
|
ERR_FAIL_COND_V_MSG(error != OK, error, "Couldn't decompress image.");
|
||||||
}
|
}
|
||||||
if (image->get_format() != Image::FORMAT_RGB8) {
|
if (image->get_format() != Image::FORMAT_RGB8) {
|
||||||
image = p_img->duplicate();
|
image = image->duplicate();
|
||||||
image->convert(Image::FORMAT_RGB8);
|
image->convert(Image::FORMAT_RGB8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user