Fix crash when launching NetSurf twice

svn path=/trunk/netsurf/; revision=11961
This commit is contained in:
Chris Young 2011-03-10 00:05:37 +00:00
parent 5e168309c2
commit d12ce6b075
1 changed files with 8 additions and 5 deletions

View File

@ -170,14 +170,17 @@ void ami_free_layers(struct gui_globals *gg)
cairo_destroy(gg->cr);
cairo_surface_destroy(gg->surface);
#endif
DeleteLayer(0,gg->rp->Layer);
FreeVec(gg->rp->TmpRas);
FreeVec(gg->rp->AreaInfo);
if(gg->rp)
{
DeleteLayer(0,gg->rp->Layer);
FreeVec(gg->rp->TmpRas);
FreeVec(gg->rp->AreaInfo);
FreeVec(gg->rp);
}
FreeVec(gg->tmprasbuf);
FreeVec(gg->areabuf);
DisposeLayerInfo(gg->layerinfo);
FreeVec(gg->rp);
p96FreeBitMap(gg->bm);
}