mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-03-04 14:21:33 +03:00
Fix crash when switching to tabs that are still loading
svn path=/trunk/netsurf/; revision=9562
This commit is contained in:
parent
665b6ceb02
commit
7f369b829b
11
amiga/gui.c
11
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user