diff --git a/src/builtin_set_color.cpp b/src/builtin_set_color.cpp index 229e7f04c..a99882c2c 100644 --- a/src/builtin_set_color.cpp +++ b/src/builtin_set_color.cpp @@ -148,7 +148,7 @@ int builtin_set_color(parser_t &parser, io_streams_t &streams, wchar_t **argv) { // Test if we have at least basic support for setting fonts, colors and related bits - otherwise // just give up... - if (!exit_attribute_mode) { + if (cur_term == NULL || !exit_attribute_mode) { return STATUS_BUILTIN_ERROR; }