From 86b6535b85d49f314e637ca534edcb0d3502cc6d Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 16 Sep 2010 20:55:25 +0000 Subject: Prevent assert on non-HTML contents svn path=/trunk/netsurf/; revision=10789 --- amiga/gui.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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))) { -- cgit v1.2.3