From ae0320150d2baec0415219ef3991431eb2ccc7af Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 6 Nov 2016 16:28:12 +0800
Subject: [PATCH] windowscodecs: Correctly indicate that the global info
 was written even without the global palette.

---
 dlls/windowscodecs/gifformat.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c
index 58144ca..6851296 100644
--- a/dlls/windowscodecs/gifformat.c
+++ b/dlls/windowscodecs/gifformat.c
@@ -2041,11 +2041,12 @@ static HRESULT WINAPI GifFrameEncode_Commit(IWICBitmapFrameEncode *iface)
                     gif_palette[i][2] = This->encoder->palette[i] & 0xff;
                 }
                 hr = IStream_Write(This->encoder->stream, gif_palette, sizeof(gif_palette), NULL);
-                if (hr == S_OK)
-                    This->encoder->info_written = TRUE;
             }
 
             /* FIXME: write GCE, APE, etc. GIF extensions */
+
+            if (hr == S_OK)
+                This->encoder->info_written = TRUE;
         }
 
         if (hr == S_OK)
-- 
1.9.1

