diff options
-rw-r--r-- | beos/scaffolding.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
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; } |