xC: don't crash on non-terminal output

This commit is contained in:
2026-07-20 02:43:13 +02:00
parent a65389ec62
commit 474a5973a3
+2 -2
View File
@@ -4772,9 +4772,9 @@ buffer_print_backlog (struct app_context *ctx, struct buffer *buffer)
input_hide (ctx->input);
// Simulate curses-like fullscreen buffers if the terminal allows it
if (g_terminal.initialized && clear_screen)
terminal_printer_fn printer = get_attribute_printer (stdout);
if (printer && clear_screen)
{
terminal_printer_fn printer = get_attribute_printer (stdout);
tputs (clear_screen, 1, printer);
if (cursor_to_ll)
tputs (cursor_to_ll, 1, printer);