image_util_retvm_if((handle == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
/* It is needed to reuse decode handle for C#, so it shoud be reallocated */
- _image_util_decode_destroy_image_handle(handle);
+ void *image_handle = (void *)(handle->image_h);
+ if (image_handle != NULL)
+ _image_util_decode_destroy_image_handle(handle);
mm_util_jpeg_yuv_data *_handle = (mm_util_jpeg_yuv_data *) calloc(1, sizeof(mm_util_jpeg_yuv_data));
image_util_retvm_if((_handle == NULL), IMAGE_UTIL_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
image_util_retvm_if((handle == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
/* It is needed to reuse decode handle for C#, so it shoud be reallocated */
- _image_util_decode_destroy_image_handle(handle);
+ void *image_handle = (void *)(handle->image_h);
+ if (image_handle != NULL)
+ _image_util_decode_destroy_image_handle(handle);
mm_util_png_data *_handle = (mm_util_png_data *) calloc(1, sizeof(mm_util_png_data));
image_util_retvm_if((_handle == NULL), IMAGE_UTIL_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
image_util_retvm_if((handle == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
/* It is needed to reuse decode handle for C#, so it shoud be reallocated */
- _image_util_decode_destroy_image_handle(handle);
+ void *image_handle = (void *)(handle->image_h);
+ if (image_handle != NULL)
+ _image_util_decode_destroy_image_handle(handle);
mm_util_gif_data *_handle = (mm_util_gif_data *) calloc(1, sizeof(mm_util_gif_data));
image_util_retvm_if((_handle == NULL), IMAGE_UTIL_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
image_util_retvm_if((handle == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
/* It is needed to reuse decode handle for C#, so it shoud be reallocated */
- _image_util_decode_destroy_image_handle(handle);
+ void *image_handle = (void *)(handle->image_h);
+ if (image_handle != NULL)
+ _image_util_decode_destroy_image_handle(handle);
mm_util_bmp_data *_handle = (mm_util_bmp_data *) calloc(1, sizeof(mm_util_bmp_data));
image_util_retvm_if((_handle == NULL), IMAGE_UTIL_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");