Change-Id: Ibf86d02ae4f55590d6f021ac9ebc27b0cfe516fc
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
+
+ // decode the whole image into bitmap buffer
+ auto pixels = (bitmap = Dali::Devel::PixelBuffer::New(bufferWidth, bufferHeight, pixelFormat)).GetBuffer();
+
+ DALI_ASSERT_DEBUG(pixels);
+
+ if(!pixels)
+ {
+ DALI_LOG_ERROR("PixelBuffer couldn't be created\n");
+ return false;
+ }
+
rows = reinterpret_cast<png_bytep*>(malloc(sizeof(png_bytep) * height));
if(DALI_UNLIKELY(!rows))
{
rows = reinterpret_cast<png_bytep*>(malloc(sizeof(png_bytep) * height));
if(DALI_UNLIKELY(!rows))
{
- // decode the whole image into bitmap buffer
- auto pixels = (bitmap = Dali::Devel::PixelBuffer::New(bufferWidth, bufferHeight, pixelFormat)).GetBuffer();
-
- DALI_ASSERT_DEBUG(pixels);
-
for(y = 0; y < height; y++)
{
rows[y] = pixels + y * stride;
for(y = 0; y < height; y++)
{
rows[y] = pixels + y * stride;