summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Redondo <qt@david-redondo.de>2023-04-11 14:27:27 +0200
committerDavid Redondo <qt@david-redondo.de>2023-04-11 20:57:33 +0200
commita76bf824fcd1cc3789f0d3454a0423c0241d9718 (patch)
treeb6fc42ccbc3f6431ee91daadce768e78b7391333 /src
parent42a6cdd6788d0b25cfc5844ed4982a4e9214e605 (diff)
downloadqtwayland-a76bf824fcd1cc3789f0d3454a0423c0241d9718.tar.gz
Destroy frame queue before display
wl_event_queue_destroy accesses the display. Found by running a test under valgrind. Pick-to: 6.5 Change-Id: Ic89cbd3b6e98b4fc9561b0e63b5fab4886a1ec50 Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src')
-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 3fe4cb50..71d5025c 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -370,11 +370,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