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 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 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 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)
|
- Bugfix: Fixed some minor typos. (#6196)
|
||||||
- Dev: Mini refactor of Split. (#6148)
|
- Dev: Mini refactor of Split. (#6148)
|
||||||
- Dev: Conan will no longer generate a `CMakeUserPresets.json` file. (#6117)
|
- Dev: Conan will no longer generate a `CMakeUserPresets.json` file. (#6117)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "common/Args.hpp"
|
#include "common/Args.hpp"
|
||||||
#include "common/Channel.hpp"
|
#include "common/Channel.hpp"
|
||||||
#include "common/QLogging.hpp"
|
|
||||||
#include "common/Version.hpp"
|
#include "common/Version.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
#include "controllers/commands/Command.hpp"
|
#include "controllers/commands/Command.hpp"
|
||||||
@@ -34,8 +33,6 @@
|
|||||||
#include "providers/bttv/BttvLiveUpdates.hpp"
|
#include "providers/bttv/BttvLiveUpdates.hpp"
|
||||||
#include "providers/chatterino/ChatterinoBadges.hpp"
|
#include "providers/chatterino/ChatterinoBadges.hpp"
|
||||||
#include "providers/ffz/FfzBadges.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/SeventvBadges.hpp"
|
||||||
#include "providers/seventv/SeventvEventAPI.hpp"
|
#include "providers/seventv/SeventvEventAPI.hpp"
|
||||||
#include "providers/twitch/ChannelPointReward.hpp"
|
#include "providers/twitch/ChannelPointReward.hpp"
|
||||||
|
|||||||
+10
-3
@@ -39,6 +39,14 @@ Frames::Frames(QList<Frame> &&frames)
|
|||||||
: items_(std::move(frames))
|
: items_(std::move(frames))
|
||||||
{
|
{
|
||||||
assertInGuiThread();
|
assertInGuiThread();
|
||||||
|
auto *app = tryGetApp();
|
||||||
|
if (app == nullptr)
|
||||||
|
{
|
||||||
|
qCDebug(chatterinoImage)
|
||||||
|
<< "Frames constructor called while app is shutting down";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DebugCount::increase("images");
|
DebugCount::increase("images");
|
||||||
if (!this->empty())
|
if (!this->empty())
|
||||||
{
|
{
|
||||||
@@ -50,7 +58,7 @@ Frames::Frames(QList<Frame> &&frames)
|
|||||||
DebugCount::increase("animated images");
|
DebugCount::increase("animated images");
|
||||||
|
|
||||||
this->gifTimerConnection_ =
|
this->gifTimerConnection_ =
|
||||||
getApp()->getEmotes()->getGIFTimer().signal.connect([this] {
|
app->getEmotes()->getGIFTimer().signal.connect([this] {
|
||||||
this->advance();
|
this->advance();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -67,8 +75,7 @@ Frames::Frames(QList<Frame> &&frames)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->durationOffset_ = std::min<int>(
|
this->durationOffset_ = std::min<int>(
|
||||||
int(getApp()->getEmotes()->getGIFTimer().position() %
|
int(app->getEmotes()->getGIFTimer().position() % totalLength),
|
||||||
totalLength),
|
|
||||||
60000);
|
60000);
|
||||||
}
|
}
|
||||||
this->processOffset();
|
this->processOffset();
|
||||||
|
|||||||
Reference in New Issue
Block a user