Skip to content

Commit 72b433c

Browse files
committed
fixed crasher
1 parent 3a9ef2a commit 72b433c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/loki_syntax.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ void syntax_select_for_filename(editor_ctx_t *ctx, char *filename) {
224224
for (unsigned int j = 0; j < HLDB_ENTRIES; j++) {
225225
struct t_editor_syntax *s = HLDB+j;
226226
unsigned int i = 0;
227+
if (s->filematch == NULL) continue; /* Skip terminator entry */
227228
while(s->filematch[i]) {
228229
char *p;
229230
int patlen = strlen(s->filematch[i]);

0 commit comments

Comments
 (0)