mirror of https://github.com/tmux/tmux.git
Allow lastgc to be NULL in grid_string_cells so find-window doesn't crash,
problem reported by eugene everson.pull/1/head
parent
6405fceee2
commit
ec75f9d1a3
2
grid.c
2
grid.c
|
@ -595,7 +595,7 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx,
|
||||||
|
|
||||||
GRID_DEBUG(gd, "px=%u, py=%u, nx=%u", px, py, nx);
|
GRID_DEBUG(gd, "px=%u, py=%u, nx=%u", px, py, nx);
|
||||||
|
|
||||||
if (*lastgc == NULL) {
|
if (lastgc != NULL && *lastgc == NULL) {
|
||||||
memcpy(&lastgc1, &grid_default_cell, sizeof lastgc1);
|
memcpy(&lastgc1, &grid_default_cell, sizeof lastgc1);
|
||||||
*lastgc = &lastgc1;
|
*lastgc = &lastgc1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue