summaryrefslogtreecommitdiff
path: root/desktop/selection.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-07-02 16:12:00 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-07-02 16:12:00 +0000
commit3f485e083d0484fb009d33222710625d62b8b77f (patch)
tree31fec5a5b8b9347895a3b151290e912b0e692a69 /desktop/selection.c
parent51f6d5475b778a0bbe9e1c18cc1a9739f6af02a1 (diff)
downloadnetsurf-3f485e083d0484fb009d33222710625d62b8b77f.tar.gz
netsurf-3f485e083d0484fb009d33222710625d62b8b77f.tar.bz2
Minor selection changes.
svn path=/trunk/netsurf/; revision=12555
Diffstat (limited to 'desktop/selection.c')
-rw-r--r--desktop/selection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/selection.c b/desktop/selection.c
index 17e97c7fc..24502ac47 100644
--- a/desktop/selection.c
+++ b/desktop/selection.c
@@ -279,8 +279,8 @@ bool selection_click(struct selection *s, browser_mouse_state mouse,
int pos = -1; /* 0 = inside selection, 1 = after it */
struct browser_window *top;
- assert(s->bw);
- top = browser_window_get_root(s->bw);
+ if (s->bw == NULL)
+ return false; /* not our problem */
if (!SAME_SPACE(s, idx))
return false; /* not our problem */
@@ -294,6 +294,8 @@ bool selection_click(struct selection *s, browser_mouse_state mouse,
}
}
+ top = browser_window_get_root(s->bw);
+
if (!pos &&
((mouse & BROWSER_MOUSE_DRAG_1) ||
(modkeys && (mouse & BROWSER_MOUSE_DRAG_2)))) {