aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index bec4aaa30cf..e89fa874c84 100644
--- a/src/window.c
+++ b/src/window.c
@@ -228,6 +228,10 @@ POS defaults to point; WINDOW, to the selected window.")
228 if (posint > BUF_ZV (buf)) 228 if (posint > BUF_ZV (buf))
229 return Qnil; 229 return Qnil;
230 230
231 /* w->start can be out of range. If it is, do something reasonable. */
232 if (top < BUF_BEGV (buf) || top > BUF_ZV (buf))
233 return Qnil;
234
231 /* If that info is not correct, calculate afresh */ 235 /* If that info is not correct, calculate afresh */
232 posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0), 236 posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0),
233 posint, height, 0, 237 posint, height, 0,