Change-Id: I72a8fcbd097b7640c221d60f4c707c40d0d5e06f
_Util::ConvertRGBA2BGRA(dst, (unsigned)w, (unsigned)h);
Bitmap bmp;
- bmp.Construct((const unsigned char*)dst, nSize, Dimension(w, h));
+ if (bmp.Construct((const unsigned char*)dst, nSize, Dimension(w, h)) != 0) {
+ MAPS_LOGE("Failed to construct a bitmap object");
+ error = MAPS_ERROR_INVALID_OPERATION;
+ free(dst);
+ break;
+ }
hereMarker->SetBitmap(bmp);
- g_free(dst);
+ free(dst);
/* position */