mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-31 00:45:17 +08:00
fix null pointer deref clang's static analyzer believes in
Check cur_term before exit_attribute_mode.
This commit is contained in:
parent
b71aa8f9e8
commit
22558f9e7b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user