From 6c63dfb18a48521cd9e62100b13eda8d0ab616f2 Mon Sep 17 00:00:00 2001 From: masaka Date: Wed, 27 Dec 2023 15:21:48 +0900 Subject: [PATCH] =?UTF-8?q?=E5=B9=85or=E9=AB=98=E3=81=95=E3=81=8CImage?= =?UTF-8?q?=E3=81=AE=E4=B8=8A=E9=99=90(16384px)=E3=82=88=E3=82=8A=E5=A4=A7?= =?UTF-8?q?=E3=81=8D=E3=81=84GIF=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=92=E8=AA=AD=E3=82=80=E3=81=A8=E3=82=A2=E3=82=AF=E3=82=BB?= =?UTF-8?q?=E3=82=B9=E9=81=95=E5=8F=8D=E3=81=8C=E8=B5=B7=E3=81=8D=E3=82=8B?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#1171)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Siv3D/src/Siv3D/ImageFormat/GIF/GIFDecoder.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Siv3D/src/Siv3D/ImageFormat/GIF/GIFDecoder.cpp b/Siv3D/src/Siv3D/ImageFormat/GIF/GIFDecoder.cpp index cbfa865e7..7abdb6c9f 100644 --- a/Siv3D/src/Siv3D/ImageFormat/GIF/GIFDecoder.cpp +++ b/Siv3D/src/Siv3D/ImageFormat/GIF/GIFDecoder.cpp @@ -159,10 +159,19 @@ namespace s3d if ((width == 0) || (height == 0)) { + DGifCloseFile(gif, &error); + return{}; } Image image{ width, height }; + if (!image) + { + DGifCloseFile(gif, &error); + + return{}; + } + Color* pDst = image.data(); for (size_t y = 0; y < height; ++y)