summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r--core/fxcodec/codec/ccodec_gifmodule.cpp8
1 files changed, 4 insertions, 4 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;
}