diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-02-16 21:09:40 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-02-16 21:09:40 +0000 |
commit | 8cece1f41f50afb11a707badc118b0b62158fa85 (patch) | |
tree | 2b654f4f66f59d0c57e660f1698b3bbea0b1f72a /riscos/save_draw.c | |
parent | 2e52ee380c8ff5c8bebafa18e8c92b2d7b8a1b69 (diff) | |
download | netsurf-8cece1f41f50afb11a707badc118b0b62158fa85.tar.gz netsurf-8cece1f41f50afb11a707badc118b0b62158fa85.tar.bz2 |
[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
Diffstat (limited to 'riscos/save_draw.c')
-rw-r--r-- | riscos/save_draw.c | 14 |
1 files 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)); |