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

Commit 25c4e987 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Android Git Automerger
Browse files

am 97b707d5: am 80a058b3: Merge "Do not attempt to decode NULL SkData." into klp-dev

* commit '97b707d5':
  Do not attempt to decode  NULL SkData.
parents 04e3a2aa 97b707d5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -514,6 +514,9 @@ static jobject nativeDecodeFileDescriptor(JNIEnv* env, jobject clazz, jobject fi
    }

    SkAutoTUnref<SkData> data(SkData::NewFromFD(descriptor));
    if (data.get() == NULL) {
        return nullObjectReturn("NewFromFD failed in nativeDecodeFileDescriptor");
    }
    SkAutoTUnref<SkMemoryStream> stream(new SkMemoryStream(data));

    /* Allow purgeable iff we own the FD, i.e., in the puregeable and