Skip to content

Commit adf8d10

Browse files
bdc34Sbozzolo
authored andcommitted
Fixes segfault when clicking error in compilation-shell-minor-mode
1 parent d958e2d commit adf8d10

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vterm-module.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,11 @@ static void fetch_cell(Term *term, int row, int col, VTermScreenCell *cell) {
209209
static char *get_row_directory(Term *term, int row) {
210210
if (row < 0) {
211211
ScrollbackLine *sbrow = term->sb_buffer[-row - 1];
212-
return sbrow->info->directory;
213-
/* return term->dirs[0]; */
212+
if ( sbrow && sbrow->info && sbrow->info->directory ) {
213+
return sbrow->info->directory;
214+
} else {
215+
return NULL;
216+
}
214217
} else {
215218
LineInfo *line = term->lines[row];
216219
return line ? line->directory : NULL;

0 commit comments

Comments
 (0)