Ensure we don't attempt to index an empty array (#3122)
This commit is contained in:
@@ -712,7 +712,7 @@ void Helix::getEmoteSetData(QString emoteSetId,
|
|||||||
QJsonObject root = result.parseJson();
|
QJsonObject root = result.parseJson();
|
||||||
auto data = root.value("data");
|
auto data = root.value("data");
|
||||||
|
|
||||||
if (!data.isArray())
|
if (!data.isArray() || data.toArray().isEmpty())
|
||||||
{
|
{
|
||||||
failureCallback();
|
failureCallback();
|
||||||
return Failure;
|
return Failure;
|
||||||
|
|||||||
Reference in New Issue
Block a user