mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-17 17:52:43 +03:00
Check for empty URL in RISC OS
This commit is contained in:
parent
daef57aaee
commit
80e9a23fc1
@ -1086,6 +1086,9 @@ const char *ro_gui_url_bar_get_url(struct url_bar *url_bar)
|
|||||||
url_bar->text_buffer_utf8 = NULL;
|
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) {
|
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;
|
return (const char *) url_bar->text_buffer_utf8;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user