mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-08 20:12:01 +03:00
windows: Use nserror reporting rather than always NoMemory
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
56a9a25192
commit
2fa06ed503
@ -1265,6 +1265,7 @@ nsws_window_command(HWND hwnd,
|
||||
case IDC_MAIN_LAUNCH_URL:
|
||||
{
|
||||
nsurl *url;
|
||||
nserror err;
|
||||
|
||||
if (GetFocus() != gw->urlbar)
|
||||
break;
|
||||
@ -1274,8 +1275,10 @@ nsws_window_command(HWND hwnd,
|
||||
SendMessage(gw->urlbar, WM_GETTEXT, (WPARAM)(len + 1), (LPARAM)addr);
|
||||
NSLOG(netsurf, INFO, "launching %s\n", addr);
|
||||
|
||||
if (nsurl_create(addr, &url) != NSERROR_OK) {
|
||||
win32_warning("NoMemory", 0);
|
||||
err = nsurl_create(addr, &url);
|
||||
|
||||
if (err != NSERROR_OK) {
|
||||
win32_report_nserror(err, 0);
|
||||
} else {
|
||||
browser_window_navigate(gw->bw,
|
||||
url,
|
||||
|
Loading…
Reference in New Issue
Block a user