libX11/u_no-longer-crash-in-XVisualIDFromVisual.patch

13 lines
369 B
Diff
Raw Normal View History

diff -u -p -r libX11-1.7.2.orig/src/Misc.c libX11-1.7.2/src/Misc.c
--- libX11-1.7.2.orig/src/Misc.c 2021-11-15 14:58:41.579310000 +0100
+++ libX11-1.7.2/src/Misc.c 2021-11-15 15:01:27.897244000 +0100
@@ -57,6 +57,8 @@ XDisplayKeycodes(
VisualID XVisualIDFromVisual(Visual *visual)
{
+ if (!visual)
+ return (VisualID)0;
return visual->visualid;
}