mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix crashed when compressing empty image data.
This commit is contained in:
parent
63f95c0e58
commit
96b0fbb756
1 changed files with 2 additions and 0 deletions
|
@ -2625,6 +2625,8 @@ Error Image::compress(CompressMode p_mode, CompressSource p_source, float p_loss
|
|||
}
|
||||
|
||||
Error Image::compress_from_channels(CompressMode p_mode, UsedChannels p_channels, float p_lossy_quality, ASTCFormat p_astc_format) {
|
||||
ERR_FAIL_COND_V(data.is_empty(), ERR_INVALID_DATA);
|
||||
|
||||
switch (p_mode) {
|
||||
case COMPRESS_S3TC: {
|
||||
ERR_FAIL_COND_V(!_image_compress_bc_func, ERR_UNAVAILABLE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue