From 6aa30c0bb3388061c2c7cd24045243fb7a1acd2e Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 11 Aug 2008 08:22:37 +0000 Subject: Add some ifdef. Error checking Finalise hubbub svn path=/trunk/netsurf/; revision=5020 --- gtk/gtk_gui.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gtk/gtk_gui.c') diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index 3967cd1cb..2efa5fa15 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -192,9 +192,12 @@ void gui_init(int argc, char** argv) LOG(("Using '%s' as Resources directory", buf)); res_dir_location = strdup(buf); +#ifdef WITH_HUBBUB find_resource(buf, "Aliases", "./gtk/res/Aliases"); LOG(("Using '%s' as Aliases file", buf)); - hubbub_initialise(buf, myrealloc, NULL); + if (hubbub_initialise(buf, myrealloc, NULL) != HUBBUB_OK) + die("Unable to initialise HTML parsing library.\n"); +#endif glade_init(); gladeWindows = glade_xml_new(glade_file_location, NULL, NULL); @@ -407,6 +410,10 @@ void gui_quit(void) free(option_cookie_file); free(option_cookie_jar); gtk_fetch_filetype_fin(); +#ifdef WITH_HUBBUB + /* We don't care if this fails as we're about to die, anyway */ + hubbub_finalise(myrealloc, NULL); +#endif } -- cgit v1.2.3