From 611837baec6a32f8c4d88c34f5b96cce15bf3120 Mon Sep 17 00:00:00 2001 From: Lasse Holmstedt Date: Thu, 19 May 2011 16:30:44 +0200 Subject: [PATCH] Don't crash if windowmanager is not initialized This can happen if there is e.g. no wayland server. Reviewed-by: sroedal (cherry picked from commit aea5e35f57d061b133d2fa613d10f5e0118f5706) --- .../qwaylandwindowmanagerintegration.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.cpp b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.cpp index 8a8e5a9992..b93e6d2f70 100644 --- a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.cpp +++ b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.cpp @@ -79,6 +79,7 @@ void QWaylandWindowManagerIntegration::wlHandleListenerGlobal(wl_display *displa void QWaylandWindowManagerIntegration::mapClientToProcess(long long processId) { - wl_windowmanager_map_client_to_process(mWaylandWindowManager, (uint32_t) processId); + if (mWaylandWindowManager) + wl_windowmanager_map_client_to_process(mWaylandWindowManager, (uint32_t) processId); }