summaryrefslogtreecommitdiff
path: root/render/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/html.c')
-rw-r--r--render/html.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/render/html.c b/render/html.c
index f6e3fda56..6c6dcdfca 100644
--- a/render/html.c
+++ b/render/html.c
@@ -2622,9 +2622,12 @@ html_get_contextual_content(struct content *c,
if (box->usemap) {
const char *target = NULL;
- data->link_url = nsurl_access(imagemap_get(html,
- box->usemap, box_x, box_y, x, y,
- &target));
+ nsurl *url = imagemap_get(html, box->usemap, box_x,
+ box_y, x, y, &target);
+ /* Box might have imagemap, but no actual link area
+ * at point */
+ if (url != NULL)
+ data->link_url = nsurl_access(url);
}
if (box->gadget) {
switch (box->gadget->type) {