diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 2bf09331c..7b6b5bfff 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -371,11 +371,11 @@ 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