fix: don't construct images after we're quitting (#6213)
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
- Bugfix: Fixed shared chat badges displaying pixelated when Chatterino is scaled too much. (#6146)
|
||||
- Bugfix: Fixed a crash that could occur when eventsub was enabled and Chatterino was attached to a conhost on Windows that was later gone. (#6161)
|
||||
- Bugfix: Fixed a crash that could occur an eventsub connection's keepalive timer would run after the connection was dead, causing the keepalive timer to use-itself-after-free. (#6204)
|
||||
- Bugfix: Fixed a crash that could occur when an image started loading mid app shutdown. (#6213)
|
||||
- Bugfix: Fixed some minor typos. (#6196)
|
||||
- Dev: Mini refactor of Split. (#6148)
|
||||
- Dev: Conan will no longer generate a `CMakeUserPresets.json` file. (#6117)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "common/Args.hpp"
|
||||
#include "common/Channel.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "common/Version.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/commands/Command.hpp"
|
||||
@@ -34,8 +33,6 @@
|
||||
#include "providers/bttv/BttvLiveUpdates.hpp"
|
||||
#include "providers/chatterino/ChatterinoBadges.hpp"
|
||||
#include "providers/ffz/FfzBadges.hpp"
|
||||
#include "providers/seventv/eventapi/Dispatch.hpp"
|
||||
#include "providers/seventv/eventapi/Subscription.hpp"
|
||||
#include "providers/seventv/SeventvBadges.hpp"
|
||||
#include "providers/seventv/SeventvEventAPI.hpp"
|
||||
#include "providers/twitch/ChannelPointReward.hpp"
|
||||
|
||||
+10
-3
@@ -39,6 +39,14 @@ Frames::Frames(QList<Frame> &&frames)
|
||||
: items_(std::move(frames))
|
||||
{
|
||||
assertInGuiThread();
|
||||
auto *app = tryGetApp();
|
||||
if (app == nullptr)
|
||||
{
|
||||
qCDebug(chatterinoImage)
|
||||
<< "Frames constructor called while app is shutting down";
|
||||
return;
|
||||
}
|
||||
|
||||
DebugCount::increase("images");
|
||||
if (!this->empty())
|
||||
{
|
||||
@@ -50,7 +58,7 @@ Frames::Frames(QList<Frame> &&frames)
|
||||
DebugCount::increase("animated images");
|
||||
|
||||
this->gifTimerConnection_ =
|
||||
getApp()->getEmotes()->getGIFTimer().signal.connect([this] {
|
||||
app->getEmotes()->getGIFTimer().signal.connect([this] {
|
||||
this->advance();
|
||||
});
|
||||
|
||||
@@ -67,8 +75,7 @@ Frames::Frames(QList<Frame> &&frames)
|
||||
else
|
||||
{
|
||||
this->durationOffset_ = std::min<int>(
|
||||
int(getApp()->getEmotes()->getGIFTimer().position() %
|
||||
totalLength),
|
||||
int(app->getEmotes()->getGIFTimer().position() % totalLength),
|
||||
60000);
|
||||
}
|
||||
this->processOffset();
|
||||
|
||||
Reference in New Issue
Block a user