mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 20:46:50 +03:00
Fix selection in plain text files, check if s->defined first, and check s->root just in case.
svn path=/trunk/netsurf/; revision=5537
This commit is contained in:
parent
76444db118
commit
4463070f1c
@ -729,7 +729,7 @@ void selection_set_start(struct selection *s, unsigned offset)
|
||||
s->start_idx = offset;
|
||||
s->defined = (s->start_idx < s->end_idx);
|
||||
|
||||
if (s->root->gadget && s->defined) {
|
||||
if (s->defined && s->root && s->root->gadget) {
|
||||
/* update the caret text_box and offset so that it stays at the
|
||||
* beginning of the selection */
|
||||
s->root->gadget->caret_text_box = selection_get_start(s,
|
||||
|
Loading…
Reference in New Issue
Block a user