mirror of
https://github.com/tmux/tmux.git
synced 2026-03-23 17:10:42 +00:00
Check lastgc is not NULL before using it, GitHub issue 4935 from Pavel
Lavrukhin.
This commit is contained in:
2
grid.c
2
grid.c
@@ -1117,7 +1117,7 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx,
|
||||
if (gc.flags & GRID_FLAG_PADDING)
|
||||
continue;
|
||||
|
||||
if (flags & GRID_STRING_WITH_SEQUENCES) {
|
||||
if (lastgc != NULL && (flags & GRID_STRING_WITH_SEQUENCES)) {
|
||||
grid_string_cells_code(*lastgc, &gc, code, sizeof code,
|
||||
flags, s, &has_link);
|
||||
codelen = strlen(code);
|
||||
|
||||
Reference in New Issue
Block a user