Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 53001ca3 authored by henry.uh_chen's avatar henry.uh_chen Committed by Chris Craik
Browse files

[Bitmap] Add null pointer protection in Bitmap_sameAs()

Symptom: SkBitmap::getAddr(int, int) may return NULL due to unrecognized config
(ex: kRLE_Index8_Config). This will cause memcmp method to crash. Since bm0 and
bm1 both have pixel data() (have passed NULL == getPixels() check), those 2
bitmaps should be valid (only unrecognized), we return JNI_FALSE to warn user
those 2 unrecognized config bitmaps may be different.

Cherry-pick of 3a1bffa8 from AOSP

Change-Id: I6970c27de412110a3035d0a783112c4cd3ebc35b
parent 94ca6cd7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment