forked from pool/java-1_8_0-openjdk
37 lines
906 B
Diff
37 lines
906 B
Diff
--- jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c 2014-09-26 08:52:13.001303676 +0200
|
|
+++ jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c 2014-09-26 08:53:14.143887542 +0200
|
|
@@ -310,7 +310,14 @@
|
|
free(pBitmapBits);
|
|
free(pOldBitmapBits);
|
|
|
|
+#if GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
|
|
+ int error = 0;
|
|
+ DGifCloseFile(gif, &error);
|
|
+ if (error)
|
|
+ return 0;
|
|
+#else
|
|
DGifCloseFile(gif);
|
|
+#endif
|
|
|
|
return 1;
|
|
}
|
|
@@ -318,9 +325,18 @@
|
|
int
|
|
SplashDecodeGifStream(Splash * splash, SplashStream * stream)
|
|
{
|
|
+#ifdef GIFLIB_MAJOR >= 5
|
|
+ int error = 0;
|
|
+ GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc, &error);
|
|
+
|
|
+ if (error)
|
|
+ return 0;
|
|
+#else
|
|
GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc);
|
|
|
|
if (!gif)
|
|
return 0;
|
|
+#endif
|
|
+
|
|
return SplashDecodeGif(splash, gif);
|
|
}
|