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.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fxcodec/codec/ccodec_gifmodule.cpp b/core/fxcodec/codec/ccodec_gifmodule.cpp
index 70f55ceaa8..983daa088f 100644
--- a/core/fxcodec/codec/ccodec_gifmodule.cpp
+++ b/core/fxcodec/codec/ccodec_gifmodule.cpp
@@ -54,7 +54,9 @@ GifDecodeStatus CCodec_GifModule::ReadHeader(FXGIF_Context* ctx,
*width = ctx->m_Gif->width;
*height = ctx->m_Gif->height;
*pal_num = ctx->m_Gif->global_pal_num;
- *pal_pp = ctx->m_Gif->m_GlobalPalette.data();
+ *pal_pp = ctx->m_Gif->m_GlobalPalette.empty()
+ ? nullptr
+ : ctx->m_Gif->m_GlobalPalette.data();
*bg_index = ctx->m_Gif->bc_index;
return GifDecodeStatus::Success;
}