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

Commit 21a888e7 authored by Toni Heidenreich's avatar Toni Heidenreich Committed by Automerger Merge Worker
Browse files

Fix NPE when accessing format. am: 5a77c85e

parents 326c5739 5a77c85e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -405,7 +405,7 @@ void MediaCodecList::findMatchingCodecs(
    // a suitable codec.
    //
    int profile = -1;
    if (matches->empty() && format->findInt32(KEY_PROFILE, &profile)) {
    if (matches->empty() && format != nullptr && format->findInt32(KEY_PROFILE, &profile)) {
        ALOGV("no matching codec found, retrying without profile");
        sp<AMessage> formatNoProfile = format->dup();
        formatNoProfile->removeEntryByName(KEY_PROFILE);