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

Commit 8b0851ca authored by Raph Levien's avatar Raph Levien Committed by Android Git Automerger
Browse files

am 3034d451: Merge "Fix for native crash on image decode OOM" into jb-mr1-dev

* commit '3034d451':
  Fix for native crash on image decode OOM
parents e6a5c571 3034d451
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -340,7 +340,9 @@ static jobject doDecode(JNIEnv* env, SkStream* stream, jobject padding,

        bitmap->setConfig(config, scaledWidth, scaledHeight);
        bitmap->setIsOpaque(decoded->isOpaque());
        bitmap->allocPixels(&javaAllocator, NULL);
        if (!bitmap->allocPixels(&javaAllocator, NULL)) {
            return nullObjectReturn("allocation failed for scaled bitmap");
        }
        bitmap->eraseColor(0);

        SkPaint paint;