Ensure we don't attempt to index an empty array (#3122)

This commit is contained in:
Paweł 2021-08-07 11:01:22 +02:00 committed by GitHub
parent 9d90de6b8c
commit cd7758a28e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -712,7 +712,7 @@ void Helix::getEmoteSetData(QString emoteSetId,
QJsonObject root = result.parseJson();
auto data = root.value("data");
if (!data.isArray())
if (!data.isArray() || data.toArray().isEmpty())
{
failureCallback();
return Failure;