summaryrefslogtreecommitdiff
path: root/frontends/riscos/global_history.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-04-14 21:08:51 +0100
committerVincent Sanders <vince@kyllikki.org>2020-04-14 21:08:51 +0100
commit84f0c760e6cadb2ccf3c7f5abd91990ab8b5c62f (patch)
tree1378080e07c51b7aa4569b40d57f2c6c9c516366 /frontends/riscos/global_history.c
parente2f34232a2e9a652e04f0b4e721a61dfde92422a (diff)
downloadnetsurf-84f0c760e6cadb2ccf3c7f5abd91990ab8b5c62f.tar.gz
netsurf-84f0c760e6cadb2ccf3c7f5abd91990ab8b5c62f.tar.bz2
use form of window create which returns an error instead of aborting
Diffstat (limited to 'frontends/riscos/global_history.c')
-rw-r--r--frontends/riscos/global_history.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/frontends/riscos/global_history.c b/frontends/riscos/global_history.c
index 7dfc58317..4f0dbd48c 100644
--- a/frontends/riscos/global_history.c
+++ b/frontends/riscos/global_history.c
@@ -367,6 +367,7 @@ global_history_menu_select(wimp_w w,
*/
static nserror ro_global_history_init(void)
{
+ os_error *error;
struct ro_global_history_window *ncwin;
nserror res;
static const struct ns_menu global_history_menu_def = {
@@ -411,7 +412,15 @@ static nserror ro_global_history_init(void)
}
/* create window from template */
- ncwin->core.wh = wimp_create_window(dialog_global_history_template);
+ error = xwimp_create_window(dialog_global_history_template,
+ &ncwin->core.wh);
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ free(ncwin);
+ return NSERROR_NOMEM;
+ }
ro_gui_set_window_title(ncwin->core.wh, messages_get("GlobalHistory"));