From 8cece1f41f50afb11a707badc118b0b62158fa85 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 16 Feb 2004 21:09:40 +0000 Subject: [project @ 2004-02-16 21:09:40 by jmb] Check that we're actually dealing with a HTML page, just in case the user is silly enough to try and save something else as draw. svn path=/import/netsurf/; revision=555 --- riscos/save_draw.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/riscos/save_draw.c b/riscos/save_draw.c index c36eaa330..b911ad770 100644 --- a/riscos/save_draw.c +++ b/riscos/save_draw.c @@ -53,9 +53,17 @@ static void add_circle(struct content *content, struct box *box, /** \todo this will probably want to take a filename/path too... */ void save_as_draw(struct content *c) { - struct box *box = c->data.html.layout->children; - int temp = c->width; - unsigned long bc = 0xffffff; + struct box *box; + int temp; + unsigned long bc; + + if (c->type != CONTENT_HTML) { + return; + } + + box = c->data.html.layout->children; + temp = c->width; + bc = 0xffffff; d = xcalloc(40, sizeof(char)); -- cgit v1.2.3