mirror of git://git.sv.gnu.org/nano.git
startup: prevent a crash when no applicable syntax is found
This fixes https://savannah.gnu.org/bugs/?56434. Signed-off-by: Brand Huntsman <alpha@qzx.com>
This commit is contained in:
parent
9b30bb15cc
commit
fb10a94f35
|
@ -274,7 +274,7 @@ void color_update(void)
|
|||
}
|
||||
|
||||
/* When the syntax isn't loaded yet, parse it and initialize its colors. */
|
||||
if (sint->filename != NULL) {
|
||||
if (sint != NULL && sint->filename != NULL) {
|
||||
parse_one_include(sint->filename, sint);
|
||||
set_syntax_colorpairs(sint);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue