Fix prevent issue - pixbuf might be NULL 20/40920/1
authorYoonsang Lee <ysang114.lee@samsung.com>
Wed, 10 Jun 2015 08:29:13 +0000 (17:29 +0900)
committerYoonsang Lee <ysang114.lee@samsung.com>
Wed, 10 Jun 2015 08:29:29 +0000 (17:29 +0900)
commit1a96698137a084f30ea4724cf3b9a61df5926063
tree512e72b65f0ffb6fa3409f46c5f56cfec3e701d0
parent7764df3bdd3942d642c7c47cc126e1757fb1756f
Fix prevent issue - pixbuf might be NULL

- GetBuffer() might return null, so move pixbuf dereferencing code into
the null checked block

<Prevent message>
2. returned_null: GetBuffer returns null. [show details]
3. var_assigned: Assigning: pixbuf = null return value from GetBuffer.
225    PixelBuffer* pixbuf = imageData->GetBuffer();

CID 402177 (#1 of 1): Dereference null return value (NULL_RETURNS)
7. dereference: Dereferencing a pointer that might be null pixbuf when calling memset. [Note: The source code implementation of the function has been overridden by a builtin model.]
253      memset( pixbuf, a, numPixels );

Change-Id: Ia35e1cb4ea2f04eac6dccbb4b8935b2c54905062
dali/internal/event/images/atlas-impl.cpp