From 4622c0e336f96841d7235a61d169e93fbef220df Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sun, 13 Nov 2022 11:09:59 -0500 Subject: [PATCH] Change assert in set_font to check w/ debug. This resolves #1292. --- src/display-x11.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/display-x11.cc b/src/display-x11.cc index 7066f06e..001ee003 100644 --- a/src/display-x11.cc +++ b/src/display-x11.cc @@ -773,7 +773,10 @@ void display_output_x11::setup_fonts(void) { } void display_output_x11::set_font(unsigned int f) { - assert(f < x_fonts.size()); + if (f >= x_fonts.size()) { + DBGP("%d >= x_fonts.size()", f); + return; + } #ifdef BUILD_XFT if (use_xft.get(*state)) { return; } #endif /* BUILD_XFT */