Null pointer check
authorPaul Olav Tvete <paul.tvete@nokia.com>
Tue, 17 Jan 2012 14:26:05 +0000 (15:26 +0100)
committerAndy Nichols <andy.nichols@nokia.com>
Tue, 17 Jan 2012 14:34:52 +0000 (15:34 +0100)
managedClient() is allowed to return 0.

Change-Id: I67f4ad9cc9bf40a829c2a26895529cabf5a716c0
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
src/compositor/wayland_wrapper/wlsurface.cpp

index 17fd3b2..307a427 100644 (file)
@@ -577,7 +577,8 @@ void Surface::setProcessId(qint64 processId)
 QByteArray Surface::authenticationToken() const
 {
     Q_D(const Surface);
-    return d->compositor->windowManagerIntegration()->managedClient(base()->resource.client)->authenticationToken();
+    WaylandManagedClient *mcl = d->compositor->windowManagerIntegration()->managedClient(base()->resource.client);
+    return mcl ? mcl->authenticationToken() : QByteArray();
 }
 
 QVariantMap Surface::windowProperties() const