Fix a possible crash when handling mouse clicks
This commit is contained in:
parent
750cf7ad20
commit
1da2344aa3
@ -2167,6 +2167,7 @@ screen_detect_url(Screen *screen, unsigned int x, unsigned int y) {
|
|||||||
bool has_url = false;
|
bool has_url = false;
|
||||||
index_type url_start, url_end = 0;
|
index_type url_start, url_end = 0;
|
||||||
Line *line = screen_visual_line(screen, y);
|
Line *line = screen_visual_line(screen, y);
|
||||||
|
if (!line || x >= screen->columns) return false;
|
||||||
if (line->cpu_cells[x].hyperlink_id) {
|
if (line->cpu_cells[x].hyperlink_id) {
|
||||||
screen_mark_hyperlink(screen, x, y);
|
screen_mark_hyperlink(screen, x, y);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user