Fix crash when attempting to dump non HTML content (Dobos D. Calin)

svn path=/trunk/netsurf/; revision=4065
This commit is contained in:
John Mark Bell 2008-03-31 19:10:19 +00:00
parent 62ca5e3e11
commit 421be3633e

View File

@ -584,8 +584,15 @@ MENUHANDLER(save_box_tree)
} else {
struct browser_window *bw;
bw = nsgtk_get_browser_window(gw->top_level);
box_dump(fh, bw->current_content->data.html.layout->children,
0);
if (bw->current_content &&
bw->current_content->type ==
CONTENT_HTML) {
box_dump(fh,
bw->current_content->data.html.layout,
0);
}
fclose(fh);
}