]> git.eshelyaron.com Git - emacs.git/commitdiff
(buffer_posn_from_coords): Check that target row is
authorKim F. Storm <storm@cua.dk>
Wed, 17 Aug 2005 15:00:14 +0000 (15:00 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 17 Aug 2005 15:00:14 +0000 (15:00 +0000)
within matrix.

src/dispnew.c

index 3f7d55b2477dba6b4307b5875424bb5c31b1e728..15190abfb7e164f1cb0541d7c06892881a6cbe1a 100644 (file)
@@ -5801,8 +5801,9 @@ buffer_posn_from_coords (w, x, y, pos, object, dx, dy, width, height)
     }
 #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])
        {