From: Kim F. Storm Date: Wed, 17 Aug 2005 15:00:14 +0000 (+0000) Subject: (buffer_posn_from_coords): Check that target row is X-Git-Tag: emacs-pretest-22.0.90~7542 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b70d98e13c27b14e12ce4cef9cd9c8758f6fff0a;p=emacs.git (buffer_posn_from_coords): Check that target row is within matrix. --- diff --git a/src/dispnew.c b/src/dispnew.c index 3f7d55b2477..15190abfb7e 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -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]) {