aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-12-12 23:51:22 -0300
committerflow <flowlnlnln@gmail.com>2022-12-12 23:51:22 -0300
commit756d933d1a5ed621a4681bbd3711d70768d84ad9 (patch)
tree7eb329379015147029aaae85e75f2eb671404d5d
parentaaef4489593e56cf2a8cbd94bb882c7114c93512 (diff)
downloadPrismLauncher-756d933d1a5ed621a4681bbd3711d70768d84ad9.tar.gz
PrismLauncher-756d933d1a5ed621a4681bbd3711d70768d84ad9.tar.bz2
PrismLauncher-756d933d1a5ed621a4681bbd3711d70768d84ad9.zip
fix: bind image fetch callback lambda to the parent object
Fixes a possible crash with the callback being called after the image object was already deleted. Signed-off-by: flow <flowlnlnln@gmail.com>
-rw-r--r--launcher/ui/widgets/VariableSizedImageObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/launcher/ui/widgets/VariableSizedImageObject.cpp b/launcher/ui/widgets/VariableSizedImageObject.cpp
index e57f7e95..991b4a04 100644
--- a/launcher/ui/widgets/VariableSizedImageObject.cpp
+++ b/launcher/ui/widgets/VariableSizedImageObject.cpp
@@ -101,7 +101,7 @@ void VariableSizedImageObject::loadImage(QTextDocument* doc, const QUrl& source,
auto full_entry_path = entry->getFullPath();
auto source_url = source;
- connect(job, &NetJob::succeeded, [this, doc, full_entry_path, source_url, posInDocument] {
+ connect(job, &NetJob::succeeded, this, [this, doc, full_entry_path, source_url, posInDocument] {
qDebug() << "Loaded resource at" << full_entry_path;
// If we flushed, don't proceed.