From 59adf8e8e9e830b3fb1a57895d3822c63fa8961b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 11 Dec 2002 21:21:17 +0000 Subject: [PATCH] (try_window_id): Don't call set_cursor_from_row if row_containing_pos returned NULL. --- src/xdisp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index bfe9d4f9637..aff2421a1b7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -11732,7 +11732,8 @@ try_window_id (w) /* Set the cursor. */ row = row_containing_pos (w, PT, r0, NULL, 0); - set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); + if (row) + set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); return 1; } } @@ -11770,7 +11771,8 @@ try_window_id (w) /* Set the cursor. */ row = row_containing_pos (w, PT, r0, NULL, 0); - set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); + if (row) + set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); return 2; } } -- 2.39.2