summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2010-09-16 20:55:25 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2010-09-16 20:55:25 +0000
commit86b6535b85d49f314e637ca534edcb0d3502cc6d (patch)
tree6af88dac11920b4b29728d86053f1272802409a8 /amiga
parentbce1f4c23149adb030f19531ff8b5dd98f359e7f (diff)
downloadnetsurf-86b6535b85d49f314e637ca534edcb0d3502cc6d.tar.gz
netsurf-86b6535b85d49f314e637ca534edcb0d3502cc6d.tar.bz2
Prevent assert on non-HTML contents
svn path=/trunk/netsurf/; revision=10789
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/gui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index bee06feef..b507b45bc 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3807,6 +3807,10 @@ struct box *ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y)
hlcache_handle *content;
int box_x=0,box_y=0;
+ content = gwin->bw->current_content;
+
+ if(content_get_type(content) != CONTENT_HTML) return NULL;
+
GetAttr(SPACE_AreaBox, (Object *)gwin->objects[GID_BROWSER],
(ULONG *)&bbox);
@@ -3819,7 +3823,6 @@ struct box *ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y)
width=bbox->Width;
height=bbox->Height;
- content = gwin->bw->current_content;
box = html_get_box_tree(content);
while ((box = box_at_point(box, *x, *y, &box_x, &box_y, &content)))
{