Commit 01669ad9 authored by Eli Zaretskii's avatar Eli Zaretskii

Avoid crashes when setting the cursor

* src/xdisp.c (display_and_set_cursor): Don't index glyphs of a
glyph row if hpos is out of valid bounds.  This avoids crashes in
some rare cases.  (Bug#24614)
parent f2144eef
......@@ -28486,8 +28486,7 @@ display_and_set_cursor (struct window *w, bool on,
glyph = NULL;
if (!glyph_row->exact_window_width_line_p
|| (0 <= hpos && hpos < glyph_row->used[TEXT_AREA]))
if (0 <= hpos && hpos < glyph_row->used[TEXT_AREA])
glyph = glyph_row->glyphs[TEXT_AREA] + hpos;
eassert (input_blocked_p ());
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment