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

Commit ea25fbd8 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Leon Scroggins
Browse files

Fix destruction order of NinePatchPeeker

Test: build with SK_DEBUG

SkAndroidCodec is going to unref the NinePatchPeeker, so make sure it
gets destructed first, before destructing the NinePatchPeeker.

Change-Id: I5bb412f1a20abd44004552e0d788a016bc4a24ae
parent 8e18b621
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,8 +67,8 @@ struct ImageDecoder {
        kOpaque      = -1,
    };

    std::unique_ptr<SkAndroidCodec> mCodec;
    NinePatchPeeker mPeeker;
    std::unique_ptr<SkAndroidCodec> mCodec;
};

static jobject native_create(JNIEnv* env, std::unique_ptr<SkStream> stream) {