From: Paul Olav Tvete Date: Tue, 17 Jan 2012 14:26:05 +0000 (+0100) Subject: Null pointer check X-Git-Tag: qt-v5.0.0-alpha1~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e4ed0367d241f89fa6f7af20c453266ab60655b;p=profile%2Fivi%2Fqtwayland.git Null pointer check managedClient() is allowed to return 0. Change-Id: I67f4ad9cc9bf40a829c2a26895529cabf5a716c0 Sanity-Review: Qt Sanity Bot Reviewed-by: Andy Nichols --- diff --git a/src/compositor/wayland_wrapper/wlsurface.cpp b/src/compositor/wayland_wrapper/wlsurface.cpp index 17fd3b2..307a427 100644 --- a/src/compositor/wayland_wrapper/wlsurface.cpp +++ b/src/compositor/wayland_wrapper/wlsurface.cpp @@ -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