diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-07-07 10:41:12 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-07-07 10:43:15 +0200 |
commit | 9e993c50e63955f4671ff26ec83ed516522b42e1 (patch) | |
tree | f61900b419d4232e17be6fb267cd5ed5e1fc6650 | |
parent | b3e9218b23557f7ca787dc0b08c150ee7a0a880e (diff) | |
download | xK-9e993c50e63955f4671ff26ec83ed516522b42e1.tar.gz xK-9e993c50e63955f4671ff26ec83ed516522b42e1.tar.xz xK-9e993c50e63955f4671ff26ec83ed516522b42e1.zip |
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.
-rw-r--r-- | xC.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 (); |