From 07c557a25d1000751bec4bb1953ac19a49412b88 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 28 May 2009 15:57:54 +0000 Subject: [PATCH] Report memory exhaustion -- the whole tree loading stuff needs an overhaul as it's pretty lax about dealing with memory exhaustion. svn path=/trunk/netsurf/; revision=7604 --- desktop/options.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop/options.c b/desktop/options.c index 958f1e7b1..a871214bf 100644 --- a/desktop/options.c +++ b/desktop/options.c @@ -603,6 +603,10 @@ void options_load_tree_entry(xmlNode *li, struct node *directory) { urldb_set_url_title(url, title); entry = tree_create_URL_node(directory, url, data, title); + if (entry == NULL) { + /** \todo why isn't this fatal? */ + warn_user("NoMemory", 0); + } xmlFree(title); free(url);