mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Allow lastgc to be NULL in grid_string_cells so find-window doesn't crash,
problem reported by eugene everson.
This commit is contained in:
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…
x
Reference in New Issue
Block a user