summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2005-02-07 14:17:35 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2005-02-07 14:17:35 +0000
commit12de122415dec4cb4852931a8aff77aeaf6d8701 (patch)
treeb6bab468f3e51cd8ed51d4203275faa74934185f /desktop
parent88da8ac0184b79e3ce4e71bd52ac1cc305916051 (diff)
downloadnetsurf-12de122415dec4cb4852931a8aff77aeaf6d8701.tar.gz
netsurf-12de122415dec4cb4852931a8aff77aeaf6d8701.tar.bz2
[project @ 2005-02-07 14:17:35 by rjw]
Stop crashes during buffered rendering freezing RISC OS svn path=/import/netsurf/; revision=1494
Diffstat (limited to 'desktop')
-rw-r--r--desktop/netsurf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index 06b105a23..4daa23eac 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -18,6 +18,9 @@
#include "netsurf/desktop/netsurf.h"
#include "netsurf/desktop/browser.h"
#include "netsurf/desktop/gui.h"
+#ifdef riscos
+#include "netsurf/riscos/buffer.h"
+#endif
#include "netsurf/utils/log.h"
#include "netsurf/utils/url.h"
#include "netsurf/utils/utils.h"
@@ -28,6 +31,7 @@ static void netsurf_init(int argc, char** argv);
static void netsurf_poll(void);
static void netsurf_exit(void);
static void lib_init(void);
+static void netsurf_cleanup(void);
/**
@@ -71,6 +75,7 @@ void netsurf_init(int argc, char** argv)
utsname.nodename, utsname.release,
utsname.version, utsname.machine));
+ atexit(netsurf_cleanup);
lib_init();
url_init();
gui_init(argc, argv);
@@ -115,3 +120,13 @@ static void lib_init(void)
if (xmlAddEncodingAlias(xmlGetCharEncodingName(XML_CHAR_ENCODING_SHIFT_JIS), "X-SJIS") != 0)
die("Failed to add encoding alias");
}
+
+/**
+ * Ensures NetSurf exits cleanly.
+ */
+static void netsurf_cleanup(void)
+{
+#ifdef riscos
+ ro_gui_buffer_close();
+#endif
+}