diff --git a/libbase/GnashImageGif.cpp b/libbase/GnashImageGif.cpp
index eeba4b7..bddb452 100644
--- a/libbase/GnashImageGif.cpp
+++ b/libbase/GnashImageGif.cpp
@@ -269,7 +269,8 @@ GifInput::processRecord(GifRecordType record)
 void
 GifInput::read()
 {
-    _gif = DGifOpen(_inStream.get(), &readData); 
+	int error_code;
+    _gif = DGifOpen(_inStream.get(), &readData, &error_code); 
 
     GifRecordType record;
 
