changeset 48807:54fb272217f5

(try_window_id): Don't call set_cursor_from_row if row_containing_pos returned NULL.
author Kim F. Storm <storm@cua.dk>
date Wed, 11 Dec 2002 21:21:17 +0000
parents b859048cf5b4
children 3928ea1dee22
files src/xdisp.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Wed Dec 11 21:20:46 2002 +0000
+++ b/src/xdisp.c	Wed Dec 11 21:21:17 2002 +0000
@@ -11732,7 +11732,8 @@
 
 	  /* 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 @@
 
 	  /* 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;
 	}
     }