fix some crashes, mostly related to network requests (#6187)

This commit is contained in:
pajlada
2025-05-17 14:22:56 +02:00
committed by GitHub
parent 46f3299a25
commit 6b968a199c
17 changed files with 259 additions and 81 deletions
+8 -1
View File
@@ -396,7 +396,14 @@ void removeLastQS(QString &str)
void writeProviderEmotesCache(const QString &id, const QString &provider,
const QByteArray &bytes)
{
QThreadPool::globalInstance()->start([bytes, id, provider]() {
auto *threadPool = QThreadPool::globalInstance();
if (threadPool == nullptr)
{
// Must be exiting - do nothing
return;
}
threadPool->start([bytes, id, provider]() {
auto cacheKey = id % "." % provider;
QFile responseCache(getApp()->getPaths().cacheFilePath(cacheKey));