File 0001-WindowThumbnail-postpone-texture-deletion-to-avoid-c.patch of Package plasma-framework.18003

From f1b572b3c03c2651bc3f11f26283f7dda8d1ecb1 Mon Sep 17 00:00:00 2001
From: Fushan Wen <qydwhotmail@gmail.com>
Date: Tue, 7 Mar 2023 22:34:03 +0800
Subject: [PATCH] WindowThumbnail: postpone texture deletion to avoid crash

The culprit was the texture that was delete as soon as the item was
delete while they may be used a bit longer by the render thread.

See also: https://github.com/sailfishos/sailfish-office/pull/85

BUG: 464186
BUG: 446874
FIXED-IN: 5.104


(cherry picked from commit 0ad9576f29a3fcc41cec283ad13d3e654508ce1f)
---
 src/declarativeimports/core/windowthumbnail.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/declarativeimports/core/windowthumbnail.cpp b/src/declarativeimports/core/windowthumbnail.cpp
index 0b630992c..761cec394 100644
--- a/src/declarativeimports/core/windowthumbnail.cpp
+++ b/src/declarativeimports/core/windowthumbnail.cpp
@@ -229,7 +229,7 @@ void WindowThumbnail::releaseResources()
 {
     QQuickWindow::RenderStage m_renderStage = QQuickWindow::NoStage;
     if (m_textureProvider) {
-        window()->scheduleRenderJob(new DiscardTextureProviderRunnable(m_textureProvider), m_renderStage);
+        window()->scheduleRenderJob(new DiscardTextureProviderRunnable(m_textureProvider), QQuickWindow::AfterSynchronizingStage);
         m_textureProvider = nullptr;
     }
 
-- 
2.41.0.windows.3

openSUSE Build Service is sponsored by