ace-of-penguins: fix help triggering segfault (#540049)

This commit is contained in:
Peder Bergebakken Sundt
2026-07-13 16:21:40 +00:00
committed by GitHub
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
diff --git a/lib/help.c b/lib/help.c
--- a/lib/help.c
+++ b/lib/help.c
@@ -177,8 +177,12 @@
for (i=0; i<17; i++)
{
if (!fonts[i])
fonts[i] = XLoadQueryFont(display, i & STYLE_TT ? "fixed" : "variable");
+ if (!fonts[i])
+ fonts[i] = XLoadQueryFont(display, "fixed");
+ if (!fonts[i])
+ return;
thin_space[i] = XTextWidth(fonts[i], " ", 1);
}
for (i=0; i<NTAGS; i++)
tags[i].taglen = strlen(tags[i].tag);

View File

@@ -27,6 +27,8 @@ stdenv.mkDerivation (finalAttrs: {
./fix-gcc-14.patch
# error: initialization of 'void (*)(int, int, int)' from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
./fix-gcc-15.patch
# fixes Wayland segfault from missing X11 fonts by providing a fallback
./fix-wayland-segfault.patch
];
nativeBuildInputs = [