diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-09-08 22:59:47 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-09-08 22:59:47 +0000 |
commit | 7f369b829bf570ee4877e6116548c67e05eea805 (patch) | |
tree | 7d0dc56e7b0ed307ad8eceff83db3313f55b35a0 | |
parent | 665b6ceb02504a5fa087ad22663ad7bbacf758de (diff) | |
download | netsurf-7f369b829bf570ee4877e6116548c67e05eea805.tar.gz netsurf-7f369b829bf570ee4877e6116548c67e05eea805.tar.bz2 |
Fix crash when switching to tabs that are still loading
svn path=/trunk/netsurf/; revision=9562
-rwxr-xr-x | amiga/gui.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index ab121582a..678e2f44f 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -1481,6 +1481,7 @@ void gui_poll(bool active) void ami_switch_tab(struct gui_window_2 *gwin,bool redraw) { struct Node *tabnode; + struct IBox *bbox; if(gwin->tabs == 0) return; @@ -1491,13 +1492,19 @@ void ami_switch_tab(struct gui_window_2 *gwin,bool redraw) TNA_UserData,&gwin->bw, TAG_DONE); curbw = gwin->bw; + GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox); + + if(!gwin->bw->current_content) + { + p96RectFill(gwin->win->RPort, bbox->Left, bbox->Top, + bbox->Width+bbox->Left, bbox->Height+bbox->Top, 0xffffffff); + return; + } ami_update_buttons(gwin); if(redraw) { - struct IBox *bbox; - GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox); p96RectFill(gwin->win->RPort,bbox->Left,bbox->Top,bbox->Width+bbox->Left,bbox->Height+bbox->Top,0xffffffff); browser_window_update(gwin->bw,false); |