From 80e9a23fc10b0749e3daede512557e7202e438bb Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 19 Jul 2015 10:45:53 +0100 Subject: [PATCH] Check for empty URL in RISC OS --- riscos/gui/url_bar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/riscos/gui/url_bar.c b/riscos/gui/url_bar.c index fa6b2aaa3..9dbb3a5d1 100644 --- a/riscos/gui/url_bar.c +++ b/riscos/gui/url_bar.c @@ -1086,6 +1086,9 @@ const char *ro_gui_url_bar_get_url(struct url_bar *url_bar) url_bar->text_buffer_utf8 = NULL; } + if (url_bar->text_buffer[0] == '\0') + return (const char *) url_bar->text_buffer; + if (utf8_from_local_encoding(url_bar->text_buffer, 0, &url_bar->text_buffer_utf8) == NSERROR_OK) { return (const char *) url_bar->text_buffer_utf8; }