mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Ensure we don't attempt to index an empty array (#3122)
This commit is contained in:
parent
9d90de6b8c
commit
cd7758a28e
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue