mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-03-21 17:55:21 -05:00
[PictureLoader] Dumb hack to fix segfault (#6010)
This commit is contained in:
parent
6b44b9ae1e
commit
76fdbfaa2f
|
|
@ -194,7 +194,10 @@ QImage PictureLoaderWorkerWork::tryLoadImageFromReply(QNetworkReply *reply)
|
|||
void PictureLoaderWorkerWork::concludeImageLoad(const QImage &image)
|
||||
{
|
||||
emit imageLoaded(cardToDownload.getCard(), image);
|
||||
this->deleteLater();
|
||||
|
||||
// Delayed delete is a dumb hack to prevent segfaults due to calling methods on a deleted Work
|
||||
// TODO: find a more proper way to structure this whole thing
|
||||
QTimer::singleShot(2000, this, &QObject::deleteLater);
|
||||
}
|
||||
|
||||
void PictureLoaderWorkerWork::picDownloadChanged()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user