Index: core/src/fxcodec/codec/fx_codec_jpeg.cpp |
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp |
index d4c9926254c71a2e4ad0380e171f065de7fe0a18..60575d4e343bdc27125806d6a37f2ace3e0998ec 100644 |
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp |
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp |
@@ -153,10 +153,7 @@ static void _JpegEncode(const CFX_DIBSource* pSource, FX_LPBYTE& dest_buf, FX_ST |
} |
FX_LPBYTE line_buf = NULL; |
if (nComponents > 1) { |
- line_buf = FX_Alloc(FX_BYTE, width * nComponents); |
- if (line_buf == NULL) { |
- return; |
- } |
+ line_buf = FX_Alloc2D(FX_BYTE, width, nComponents); |
} |
jpeg_set_defaults(&cinfo); |
if(quality != 75) { |