Use DestroyImageList instead of DestroyImage 01/229201/1 accepted/tizen/5.5/unified/20200402.163427 submit/tizen_5.5/20200330.082308 submit/tizen_5.5/20200401.004924 submit/tizen_5.5/20200401.223939
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 30 Mar 2020 08:21:20 +0000 (17:21 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Mon, 30 Mar 2020 08:21:20 +0000 (17:21 +0900)
If input image type is agif, returned Image structure is list.

Change-Id: I16c3b1cbde6048c45cad5ff07ea51d9dfa52dbcc
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
magick/mm_util_magick.c

index 42363f09d6e452608325d944d8423344a9eec31f..e9bb9cba6c9ecd63fd26e7391701576d2a67785a 100644 (file)
@@ -79,11 +79,8 @@ static void __mm_util_init(ExceptionInfo *exception)
 static void __mm_util_finalize(Image *image_1, Image *image_2, ImageInfo *imageInfo, ExceptionInfo *exception)
 {
 
-       if (image_1 != NULL)
-               DestroyImage(image_1);
-
-       if (image_2 != NULL)
-               DestroyImage(image_2);
+       DestroyImageList(image_1);
+       DestroyImageList(image_2);
 
        if (imageInfo != NULL)
                DestroyImageInfo(imageInfo);
@@ -214,8 +211,7 @@ static Image * __mm_util_resize_image(Image *image, unsigned int width, unsigned
                        CatchException(&exception);
        }
 
-       if (_sampled_image != NULL)
-               DestroyImage(_sampled_image);
+       DestroyImageList(_sampled_image);
 
        DestroyExceptionInfo(&exception);