changeset 65016:2b179104bc17

(buffer_posn_from_coords): Check that target row is within matrix.
author Kim F. Storm <storm@cua.dk>
date Wed, 17 Aug 2005 15:00:14 +0000
parents 103b7190c29c
children d2f0e0ee3df1
files src/dispnew.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispnew.c	Wed Aug 17 14:59:41 2005 +0000
+++ b/src/dispnew.c	Wed Aug 17 15:00:14 2005 +0000
@@ -5801,8 +5801,9 @@
     }
 #endif
 
-  row = MATRIX_ROW (w->current_matrix, it.vpos);
-  if (row->enabled_p)
+  if (it.vpos < w->current_matrix->nrows
+      && (row = MATRIX_ROW (w->current_matrix, it.vpos),
+	  row->enabled_p))
     {
       if (it.hpos < row->used[TEXT_AREA])
 	{