SDL_image: Really fix https://github.com/libsdl-org/SDL_image/issues/180 (5f73c)

From 5f73c9e7d0f84b4b574201ecba01bd0d1ef48669 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 21 Jul 2021 11:10:10 +0300
Subject: [PATCH] Really fix https://github.com/libsdl-org/SDL_image/issues/180

---
 IMG_gif.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/IMG_gif.c b/IMG_gif.c
index b00e7c1..9331eee 100644
--- a/IMG_gif.c
+++ b/IMG_gif.c
@@ -645,6 +645,10 @@ ReadImage(SDL_RWops * src, int len, int height, int cmapSize,
     if (!image) {
         return NULL;
     }
+    if (!image->pixels) {
+        SDL_FreeSurface(image);
+        return NULL;
+    }
 
     for (i = 0; i < cmapSize; i++)
         ImageSetCmap(image, i, cmap[CM_RED][i],