From b572c187a4d561d22dc7fb474dd516aaf184975c Mon Sep 17 00:00:00 2001 From: Daniel <24928223+dnsge@users.noreply.github.com> Date: Tue, 17 Nov 2020 04:27:14 -0500 Subject: [PATCH] Fix FFZ emote assertion crash (#2192) * Fix crash on null urls from FFZ API * Update CHANGELOG.md * Turns out there's an actual method for this --- CHANGELOG.md | 1 + src/providers/ffz/FfzEmotes.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb30a603..f1bbbcc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ - Bugfix: Fix bug preventing moderator actions when viewing a user card from the search window (#1089) - Bugfix: Fix `:` emote completion menu ignoring emote capitalization (#1962) - Bugfix: Fix a bug that caused `Ignore page` to fall into an infinity loop with an empty pattern and regex enabled (#2125) +- Bugfix: Fix a crash casued by FrankerFaceZ responding with invalid emote links (#2191) ## 2.2.0 diff --git a/src/providers/ffz/FfzEmotes.cpp b/src/providers/ffz/FfzEmotes.cpp index dc1b1ab3..ffef47e9 100644 --- a/src/providers/ffz/FfzEmotes.cpp +++ b/src/providers/ffz/FfzEmotes.cpp @@ -14,7 +14,7 @@ namespace { Url getEmoteLink(const QJsonObject &urls, const QString &emoteScale) { auto emote = urls.value(emoteScale); - if (emote.isUndefined()) + if (emote.isUndefined() || emote.isNull()) { return {""}; }