diff options
Diffstat (limited to 'core/src/fxcodec')
-rw-r--r-- | core/src/fxcodec/codec/fx_codec.cpp | 2 | ||||
-rw-r--r-- | core/src/fxcodec/lbmp/fx_bmp.cpp | 2 | ||||
-rw-r--r-- | core/src/fxcodec/lgif/fx_gif.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/core/src/fxcodec/codec/fx_codec.cpp b/core/src/fxcodec/codec/fx_codec.cpp index 36dff5e5b2..0c30684e68 100644 --- a/core/src/fxcodec/codec/fx_codec.cpp +++ b/core/src/fxcodec/codec/fx_codec.cpp @@ -123,7 +123,7 @@ void CCodec_ScanlineDecoder::DownScale(int dest_width, int dest_height) FX_Free(m_pDataCache); m_pDataCache = NULL; } - m_pDataCache = (CCodec_ImageDataCache*)FX_AllocNL(FX_BYTE, sizeof(CCodec_ImageDataCache) + m_Pitch * m_OutputHeight); + m_pDataCache = (CCodec_ImageDataCache*)FX_TryAlloc(FX_BYTE, sizeof(CCodec_ImageDataCache) + m_Pitch * m_OutputHeight); if (m_pDataCache == NULL) { return; } diff --git a/core/src/fxcodec/lbmp/fx_bmp.cpp b/core/src/fxcodec/lbmp/fx_bmp.cpp index 4c6eb61757..e868fdeaef 100644 --- a/core/src/fxcodec/lbmp/fx_bmp.cpp +++ b/core/src/fxcodec/lbmp/fx_bmp.cpp @@ -882,7 +882,7 @@ FX_BOOL _bmp_encode_image( bmp_compress_struct_p bmp_ptr, FX_LPBYTE& dst_buf, FX pal_size = sizeof(FX_DWORD) * bmp_ptr->info_header.biClrUsed;
}
dst_size = head_size + sizeof(FX_DWORD) * bmp_ptr->pal_num;
- dst_buf = FX_AllocNL(FX_BYTE, dst_size);
+ dst_buf = FX_TryAlloc(FX_BYTE, dst_size);
if (dst_buf == NULL) {
return FALSE;
}
diff --git a/core/src/fxcodec/lgif/fx_gif.cpp b/core/src/fxcodec/lgif/fx_gif.cpp index 08c1803e8a..bc6109e88e 100644 --- a/core/src/fxcodec/lgif/fx_gif.cpp +++ b/core/src/fxcodec/lgif/fx_gif.cpp @@ -1147,7 +1147,7 @@ static FX_BOOL _gif_write_header( gif_compress_struct_p gif_ptr, FX_LPBYTE& dst_ return TRUE;
}
dst_len = sizeof(GifHeader) + sizeof(GifLSD) + sizeof(GifGF);
- dst_buf = FX_AllocNL(FX_BYTE, dst_len);
+ dst_buf = FX_TryAlloc(FX_BYTE, dst_len);
if (dst_buf == NULL) {
return FALSE;
}
|