From 1a677937844ad99c49ffd2fe7e996083dcaed9f7 Mon Sep 17 00:00:00 2001 From: Adrian Lees Date: Sun, 24 Jun 2007 18:00:46 +0000 Subject: Fix crash if content failed to open (memory shortage) svn path=/trunk/netsurf/; revision=3365 --- riscos/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'riscos/window.c') diff --git a/riscos/window.c b/riscos/window.c index 2d9e8da58..c47d02c49 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1944,7 +1944,7 @@ void ro_gui_window_close(wimp_w w) { if (g->bw) content = g->bw->current_content; if (pointer.buttons & wimp_CLICK_ADJUST) { - filename = url_to_path(content->url); + filename = (content && content->url) ? url_to_path(content->url) : NULL; if (filename) { temp_name = malloc(strlen(filename) + 32); if (temp_name) { -- cgit v1.2.3