diff options
Diffstat (limited to 'drivers/png')
-rw-r--r-- | drivers/png/png_driver_common.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/png/png_driver_common.cpp b/drivers/png/png_driver_common.cpp index 68faff30fc..77d5e68826 100644 --- a/drivers/png/png_driver_common.cpp +++ b/drivers/png/png_driver_common.cpp @@ -122,8 +122,9 @@ Error png_to_image(const uint8_t *p_source, size_t p_size, Ref<Image> p_image) { Error image_to_png(const Ref<Image> &p_image, Vector<uint8_t> &p_buffer) { Ref<Image> source_image = p_image->duplicate(); - if (source_image->is_compressed()) + if (source_image->is_compressed()) { source_image->decompress(); + } ERR_FAIL_COND_V(source_image->is_compressed(), FAILED); |