commit fb10a94f35d16bb3eb20225d09fef58136af4634
parent 9b30bb15cc3bb18f3b4999f35736e73b8f3892f7
Author: Brand Huntsman <alpha@qzx.com>
Date: Mon, 3 Jun 2019 16:34:27 -0600
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>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/color.c b/src/color.c
@@ -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);
}