Fix crash if content failed to open (memory shortage)

svn path=/trunk/netsurf/; revision=3365
This commit is contained in:
Adrian Lees 2007-06-24 18:00:46 +00:00
parent 9e2baee37d
commit 1a67793784
1 changed files with 1 additions and 1 deletions

View File

@ -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) {