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

Commit a0cba0fd authored by Raph Levien's avatar Raph Levien
Browse files

Check for NULL on TypefaceImpl unref

It's possible for a TypefaceImpl to contain a null pointer, which was
causing crashes on unref. This patch just checks for NULL.

Fixes bug 15104801 "Aviate Launcher crashes on startup - Hammerhead L
AAV49B"

Change-Id: Idf9f176c54bf81ff3daacc0b33e95aa9d8bbe57f
parent a9efb284
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -171,7 +171,9 @@ TypefaceImpl* TypefaceImpl_createFromFamilies(const jlong* families, size_t size
}

void TypefaceImpl_unref(TypefaceImpl* face) {
    if (face != NULL) {
        face->fFontCollection->Unref();
    }
    delete face;
}