Fix crash when switching tabs

svn path=/trunk/netsurf/; revision=12932
This commit is contained in:
Chris Young 2011-10-03 18:08:52 +00:00
parent 231dfe5887
commit b9a40d8e47

View File

@ -2037,7 +2037,8 @@ void ami_switch_tab(struct gui_window_2 *gwin,bool redraw)
if(gwin->tabs == 0) return;
gui_window_get_scroll(gwin->bw->window,&gwin->bw->window->scrollx,&gwin->bw->window->scrolly);
gui_window_get_scroll(gwin->bw->window,
&gwin->bw->window->scrollx, &gwin->bw->window->scrolly);
GetAttr(CLICKTAB_CurrentNode, (Object *)gwin->objects[GID_TABS],
(ULONG *)&tabnode);
@ -2064,15 +2065,17 @@ void ami_switch_tab(struct gui_window_2 *gwin,bool redraw)
{
gui_window_set_icon(gwin->bw->window, gwin->bw->window->favicon);
p96RectFill(gwin->win->RPort,bbox->Left,bbox->Top,bbox->Width+bbox->Left,bbox->Height+bbox->Top,0xffffffff);
p96RectFill(gwin->win->RPort, bbox->Left, bbox->Top,
bbox->Width+bbox->Left, bbox->Height+bbox->Top, 0xffffffff);
browser_window_update(gwin->bw, false);
gui_window_set_scroll(gwin->bw->window,gwin->bw->window->scrollx,gwin->bw->window->scrolly);
gui_window_set_scroll(gwin->bw->window,
gwin->bw->window->scrollx, gwin->bw->window->scrolly);
gwin->redraw_scroll = false;
browser_window_refresh_url_bar(gwin->bw,
nsurl_access(content_get_url(gwin->bw->current_content)), gwin->bw->frag_id);
content_get_url(gwin->bw->current_content), gwin->bw->frag_id);
}
}