summaryrefslogtreecommitdiff
path: root/riscos/menus.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2005-06-07 21:58:17 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2005-06-07 21:58:17 +0000
commitc0fce75798460fd00ae9f84bf4c9613558ee9324 (patch)
treebbb2ee0e89304b10afb60ea83f66a729750204dd /riscos/menus.c
parent0bcfdbeb50b2435b848ea1fd50ccc79ba64fd129 (diff)
downloadnetsurf-c0fce75798460fd00ae9f84bf4c9613558ee9324.tar.gz
netsurf-c0fce75798460fd00ae9f84bf4c9613558ee9324.tar.bz2
[project @ 2005-06-07 21:58:17 by jmb]
Fix stupid assertions. svn path=/import/netsurf/; revision=1745
Diffstat (limited to 'riscos/menus.c')
-rw-r--r--riscos/menus.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/riscos/menus.c b/riscos/menus.c
index e15c638d5..42f2d6f01 100644
--- a/riscos/menus.c
+++ b/riscos/menus.c
@@ -964,8 +964,15 @@ void gui_create_form_select_menu(struct browser_window *bw,
wimp_ICON_BG_COLOUR_SHIFT);
err = utf8_to_enc(option->text,
local_encoding_name(), 0, &text_convert);
- /* this should never fail */
- assert(err == UTF8_CONVERT_OK);
+ if (err != UTF8_CONVERT_OK) {
+ /* A bad encoding should never happen,
+ * so assert this */
+ assert(err != UTF8_CONVERT_BADENC);
+ LOG(("utf8_to_enc failed"));
+ warn_user("NoMemory", 0);
+ ro_gui_menu_closed();
+ return;
+ }
gui_form_select_menu->entries[i].data.indirected_text.text =
text_convert;