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:
Brand Huntsman 2019-06-03 16:34:27 -06:00 committed by Benno Schulenberg
parent 9b30bb15cc
commit fb10a94f35
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}