summaryrefslogtreecommitdiff
path: root/gtk/gtk_gui.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-08-11 08:22:37 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-08-11 08:22:37 +0000
commit6aa30c0bb3388061c2c7cd24045243fb7a1acd2e (patch)
treeb0818a83c30df4811b795b293304a3ec476c5c3c /gtk/gtk_gui.c
parent191d876e414047232c8ad252862fc2b97ca71ee8 (diff)
downloadnetsurf-6aa30c0bb3388061c2c7cd24045243fb7a1acd2e.tar.gz
netsurf-6aa30c0bb3388061c2c7cd24045243fb7a1acd2e.tar.bz2
Add some ifdef.
Error checking Finalise hubbub svn path=/trunk/netsurf/; revision=5020
Diffstat (limited to 'gtk/gtk_gui.c')
-rw-r--r--gtk/gtk_gui.c9
1 files changed, 8 insertions, 1 deletions
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
}