diff src/dispnew.c @ 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 74ab28cf1192
children 7b2a711dc863 2d92f5c9d6ae
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])
 	{