From: Michel Dänzer <[email protected]>

These guards were dropped by the commit below, but it turns out they're
needed. Fixes crash on VT switch.

Fixes: d8ec33fe0542 ("glx: Use vnd layer for dispatch (v4)")
Bugzilla: https://bugs.freedesktop.org/105233
Signed-off-by: Michel Dänzer <[email protected]>
---
 glx/glxext.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/glx/glxext.c b/glx/glxext.c
index 37416a4e4..f1355ce31 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -652,7 +652,7 @@ glxSuspendClients(void)
     int i;
 
     for (i = 1; i < currentMaxClients; i++) {
-        if (glxGetClient(clients[i])->client)
+        if (clients[i] && glxGetClient(clients[i])->client)
             IgnoreClient(clients[i]);
     }
 
@@ -668,7 +668,7 @@ glxResumeClients(void)
     glxBlockClients = FALSE;
 
     for (i = 1; i < currentMaxClients; i++) {
-        if (glxGetClient(clients[i])->client)
+        if (clients[i] && glxGetClient(clients[i])->client)
             AttendClient(clients[i]);
     }
 
-- 
2.16.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to