summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Redondo <qt@david-redondo.de>2023-04-11 14:27:27 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-04-11 19:56:37 +0000
commite4cebf9fe5d073a1a622aa5af95fb5a3bc82098e (patch)
tree6154c7c0920d9b1f58ff2e43de161ca001622e5c
parent15d2c756ea8120097dc6cb98f4d167f9099e8dd4 (diff)
downloadqtwayland-e4cebf9fe5d073a1a622aa5af95fb5a3bc82098e.tar.gz
Destroy frame queue before display
wl_event_queue_destroy accesses the display. Found by running a test under valgrind. Change-Id: Ic89cbd3b6e98b4fc9561b0e63b5fab4886a1ec50 Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit a76bf824fcd1cc3789f0d3454a0423c0241d9718) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/client/qwaylanddisplay.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index bb88a688..07e89891 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -371,11 +371,12 @@ QWaylandDisplay::~QWaylandDisplay(void)
#if QT_CONFIG(cursor)
mCursorThemes.clear();
#endif
- if (mDisplay)
- wl_display_disconnect(mDisplay);
if (m_frameEventQueue)
wl_event_queue_destroy(m_frameEventQueue);
+
+ if (mDisplay)
+ wl_display_disconnect(mDisplay);
}
// Steps which is called just after constructor. This separates registry_global() out of the constructor