summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/fxcodec/codec/ccodec_gifmodule.cpp8
-rw-r--r--core/fxcodec/fx_codec.h6
2 files changed, 4 insertions, 10 deletions
diff --git a/core/fxcodec/codec/ccodec_gifmodule.cpp b/core/fxcodec/codec/ccodec_gifmodule.cpp
index 9911d0f5e0..7bf216e393 100644
--- a/core/fxcodec/codec/ccodec_gifmodule.cpp
+++ b/core/fxcodec/codec/ccodec_gifmodule.cpp
@@ -57,12 +57,12 @@ CFX_GifDecodeStatus CCodec_GifModule::LoadFrame(Context* pContext,
CFX_DIBAttribute* pAttribute) {
auto* context = static_cast<CFX_GifContext*>(pContext);
CFX_GifDecodeStatus ret = context->LoadFrame(frame_num);
- if (ret != CFX_GifDecodeStatus::Success || !pAttribute)
+ if (ret != CFX_GifDecodeStatus::Success)
return ret;
- pAttribute->m_nGifLeft = context->images_[frame_num]->image_info.left;
- pAttribute->m_nGifTop = context->images_[frame_num]->image_info.top;
- pAttribute->m_fAspectRatio = context->pixel_aspect_;
+ if (pAttribute)
+ pAttribute->m_fAspectRatio = context->pixel_aspect_;
+
return CFX_GifDecodeStatus::Success;
}
diff --git a/core/fxcodec/fx_codec.h b/core/fxcodec/fx_codec.h
index 458358085a..1eaf846fd7 100644
--- a/core/fxcodec/fx_codec.h
+++ b/core/fxcodec/fx_codec.h
@@ -59,12 +59,6 @@ class CFX_DIBAttribute {
#ifdef PDF_ENABLE_XFA_BMP
int32_t m_nBmpCompressType = 0;
#endif // PDF_ENABLE_XFA_BMP
-#ifdef PDF_ENABLE_XFA_GIF
- int32_t m_nGifLeft = 0;
- int32_t m_nGifTop = 0;
- uint32_t* m_pGifLocalPalette = nullptr;
- uint32_t m_nGifLocalPalNum = 0;
-#endif // PDF_ENABLE_XFA_GIF
int32_t m_nXDPI = -1;
int32_t m_nYDPI = -1;