Don't crash if windowmanager is not initialized
authorLasse Holmstedt <lasse.holmstedt@nokia.com>
Thu, 19 May 2011 14:30:44 +0000 (16:30 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Thu, 19 May 2011 14:54:12 +0000 (16:54 +0200)
This can happen if there is e.g. no wayland server.

Reviewed-by: sroedal
(cherry picked from commit aea5e35f57d061b133d2fa613d10f5e0118f5706)

src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.cpp

index 8a8e5a9..b93e6d2 100644 (file)
@@ -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);
 }