From 8aeafbdc5e04c35d77be00d5eef14c795ff55232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Poizl?= Date: Wed, 14 Apr 2021 10:28:38 +0200 Subject: [PATCH] Properly handle load when QPixmap is null --- imageringlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imageringlist.cpp b/imageringlist.cpp index c62efd6..3fb6edb 100644 --- a/imageringlist.cpp +++ b/imageringlist.cpp @@ -19,13 +19,13 @@ Image::Image(const QString name, ImageRingList *ringList) : void Image::load() { - if(m_pixmap.isNull() && !m_loading) + if(m_pixmap.isNull() && !m_rawImage && !m_loading) { m_loading = true; m_released = false; QThreadPool::globalInstance()->start(new LoadRunable(m_name, this, m_ringList->analyzeLevel())); } - if(!m_loading && !m_pixmap.isNull()) + if(!m_loading && (!m_pixmap.isNull() || m_rawImage)) emit pixmapLoaded(this); }