qt5-qtwayland/0036-Check-pointer-for-null-before-use-in-ASSERT.patch
Jan Grulich 1d0bf7d1b2 5.15.8
2023-01-05 17:03:30 +01:00

35 lines
1.1 KiB
Diff

From e043e3770da7ac7dc2e899e4f8f4d23eb8d53161 Mon Sep 17 00:00:00 2001
From: Roman Genkhel <roman.genhel@lge.com>
Date: Thu, 12 Nov 2020 12:21:51 +0300
Subject: [PATCH 36/57] Check pointer for null before use in ASSERT
Task-number: QTBUG-85195
Change-Id: I331e54f6e58aa9d536351a55223610c60b3cb414
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit e235e8ddb1fc3cc5ab3b70b1fb285770b2c8c9ca)
---
src/client/qwaylandwindow.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 6923c9a7..a4190e16 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -536,12 +536,12 @@ void QWaylandWindow::sendRecursiveExposeEvent()
void QWaylandWindow::attach(QWaylandBuffer *buffer, int x, int y)
{
- Q_ASSERT(!buffer->committed());
QReadLocker locker(&mSurfaceLock);
if (mSurface == nullptr)
return;
if (buffer) {
+ Q_ASSERT(!buffer->committed());
handleUpdate();
buffer->setBusy();
--
2.39.0