xC: don't crash with unknown terminals
It would be possible to avoid using cur_term fields in this case, but the program would likely be of little use anyway.
This commit is contained in:
parent
b3e9218b23
commit
9e993c50e6
6
xC.c
6
xC.c
|
@ -16091,7 +16091,11 @@ main (int argc, char *argv[])
|
|||
|
||||
// The following part is a bit brittle because of interdependencies
|
||||
init_colors (&ctx);
|
||||
if (format_mode) format_input_and_die (&ctx);
|
||||
if (format_mode)
|
||||
format_input_and_die (&ctx);
|
||||
if (!cur_term)
|
||||
exit_fatal ("terminal initialization failed");
|
||||
|
||||
init_global_buffer (&ctx);
|
||||
show_logo (&ctx);
|
||||
setup_signal_handlers ();
|
||||
|
|
Loading…
Reference in New Issue