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
+11
View File
@@ -1,5 +1,6 @@
#include "widgets/helper/NotebookButton.hpp"
#include "Application.hpp"
#include "common/QLogging.hpp"
#include "singletons/Theme.hpp"
#include "widgets/helper/Button.hpp"
@@ -213,11 +214,21 @@ void NotebookButton::dropEvent(QDropEvent *event)
void NotebookButton::hideEvent(QHideEvent *)
{
if (isAppAboutToQuit())
{
return;
}
this->parent_->refresh();
}
void NotebookButton::showEvent(QShowEvent *)
{
if (isAppAboutToQuit())
{
return;
}
this->parent_->refresh();
}
+2
View File
@@ -848,6 +848,8 @@ void SplitHeader::updateChannelText()
NetworkRequest(url, NetworkRequestType::Get)
.caller(this)
.onSuccess([this](auto result) {
assert(!isAppAboutToQuit());
// NOTE: We do not follow the redirects, so we need to make sure we only treat code 200 as a valid image
if (result.status() == 200)
{