From ec75f9d1a36b6f46e7ec6597d295f113c4aa12b3 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 6 Mar 2013 09:56:31 +0000 Subject: [PATCH] Allow lastgc to be NULL in grid_string_cells so find-window doesn't crash, problem reported by eugene everson. --- grid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grid.c b/grid.c index b30127f3..551a7dc9 100644 --- a/grid.c +++ b/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); - if (*lastgc == NULL) { + if (lastgc != NULL && *lastgc == NULL) { memcpy(&lastgc1, &grid_default_cell, sizeof lastgc1); *lastgc = &lastgc1; }