Merge "Fix crash when decoding bitmap" into jb-dev

This commit is contained in:
Marco Nelissen
2012-05-07 12:09:02 -07:00
committed by Android (Google) Code Review

View File

@@ -360,6 +360,9 @@ static jobject doDecode(JNIEnv* env, SkStream* stream, jobject padding,
// already have a pixelref installed.
pr = bitmap->pixelRef();
}
if (pr == NULL) {
return nullObjectReturn("Got null SkPixelRef");
}
if (!isMutable) {
// promise we will never change our pixels (great for sharing and pictures)