From 421be3633ef998c299f82468b1c6d27bff7e2f32 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 31 Mar 2008 19:10:19 +0000 Subject: [PATCH] Fix crash when attempting to dump non HTML content (Dobos D. Calin) svn path=/trunk/netsurf/; revision=4065 --- gtk/gtk_scaffolding.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gtk/gtk_scaffolding.c b/gtk/gtk_scaffolding.c index 55d3c8938..ddf251f7a 100644 --- a/gtk/gtk_scaffolding.c +++ b/gtk/gtk_scaffolding.c @@ -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); }