Explorar el Código

Break out of astc image_compress error too for consistency

Raziel Alphadios hace 3 años
padre
commit
2e26b42318
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/image_encode.cpp

+ 3 - 1
src/image_encode.cpp

@@ -204,9 +204,11 @@ namespace bimg
 					if (status != ASTCENC_SUCCESS) {
 					if (status != ASTCENC_SUCCESS) {
 						BX_TRACE("astc error in compress image %s", astcenc_get_error_string(status));
 						BX_TRACE("astc error in compress image %s", astcenc_get_error_string(status));
 						BX_ERROR_SET(_err, BIMG_ERROR, "Unable to compress astc image!");
 						BX_ERROR_SET(_err, BIMG_ERROR, "Unable to compress astc image!");
+						astcenc_context_free(context);
+						break;
 					}
 					}
+
 					astcenc_context_free(context);
 					astcenc_context_free(context);
-					
 				}
 				}
 				break;
 				break;