From 847e1111bce323ba5277c4babf70c5441233bcd7 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 29 Oct 2014 00:37:35 +0000 Subject: fix beos url setting function to return error code --- beos/scaffolding.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'beos') diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp index 48cf72ec3..cdd809f0e 100644 --- a/beos/scaffolding.cpp +++ b/beos/scaffolding.cpp @@ -2166,18 +2166,21 @@ void gui_window_set_status(struct gui_window *_g, const char *text) g->top_view->UnlockLooper(); } -nserror gui_window_set_url(struct gui_window *_g, const char *url) +nserror gui_window_set_url(struct gui_window *gw, const char *url) { - struct beos_scaffolding *g = nsbeos_get_scaffold(_g); - if (g->top_level != _g) return; - assert(g->status_bar); + struct beos_scaffolding *g; - if (!g->top_view->LockLooper()) - return; + g = nsbeos_get_scaffold(gw); + if (g->top_level != gw) + return NSERROR_OK; + + assert(g->status_bar); - g->url_bar->SetText(url); + if (g->top_view->LockLooper()) { + g->url_bar->SetText(url); - g->top_view->UnlockLooper(); + g->top_view->UnlockLooper(); + } return NSERROR_OK; } -- cgit v1.2.3