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

Commit cfb125bf authored by Robert Shih's avatar Robert Shih Committed by Lajos Molnar
Browse files

M3UParser: check for NULL before setting meta data

Bug:16351654
Change-Id: I64e9510f719b220471522b4d78a9b00a98bda772
parent f839b8b4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -715,6 +715,9 @@ status_t M3UParser::parseStreamInf(

            key.tolower();
            const AString &codecs = unquoteString(val);
            if (meta->get() == NULL) {
                *meta = new AMessage;
            }
            (*meta)->setString(key.c_str(), codecs.c_str());
        } else if (!strcasecmp("audio", key.c_str())
                || !strcasecmp("video", key.c_str())
@@ -738,6 +741,9 @@ status_t M3UParser::parseStreamInf(
            }

            key.tolower();
            if (meta->get() == NULL) {
                *meta = new AMessage;
            }
            (*meta)->setString(key.c_str(), groupID.c_str());
        }
    }