View | Details | Raw Unified | Return to bug 263286
Collapse All | Expand All

(-)b/x11-servers/xorg-server/files/patch-present_present__scmd.c (+27 lines)
Added Link Here
1
# present: Check for NULL to prevent crash
2
#
3
# https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275
4
5
diff --git a/present/present_scmd.c b/present/present_scmd.c
6
--- present/present_scmd.c.orig
7
+++ present/present_scmd.c
8
@@ -168,6 +168,9 @@ present_scmd_get_crtc(present_screen_priv_ptr screen_priv, WindowPtr window)
9
     if (!screen_priv->info)
10
         return NULL;
11
 
12
+    if (!screen_priv->info->get_crtc)
13
+        return NULL;
14
+
15
     return (*screen_priv->info->get_crtc)(window);
16
 }
17
 
18
@@ -206,6 +209,9 @@ present_flush(WindowPtr window)
19
     if (!screen_priv->info)
20
         return;
21
 
22
+    if (!screen_priv->info->flush)
23
+        return;
24
+
25
     (*screen_priv->info->flush) (window);
26
 }
27
 

Return to bug 263286