From cc922574c6e29b1678d06c330a7d9feaaaefebc5 Mon Sep 17 00:00:00 2001 From: Prince Gupta Date: Mon, 11 Mar 2024 12:11:52 +0530 Subject: [PATCH] qt: fix possible infinite loading in RoundImage correctly handle error for custom generators --- modules/gui/qt/widgets/native/roundimage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/gui/qt/widgets/native/roundimage.cpp b/modules/gui/qt/widgets/native/roundimage.cpp index c62cf7cd39..89dda60b28 100644 --- a/modules/gui/qt/widgets/native/roundimage.cpp +++ b/modules/gui/qt/widgets/native/roundimage.cpp @@ -283,7 +283,11 @@ namespace auto textureFactory = std::unique_ptr(response->textureFactory()); auto img = !textureFactory ? QImage {} : textureFactory->image(); if (!textureFactory || img.isNull()) + { + // source response failed, signal to parent + emit finished(); return; + } response->disconnect(this); response->deleteLater();