mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-24 07:19:37 +03:00
Fix crash when launching NetSurf if it is already running.
svn path=/trunk/netsurf/; revision=5941
This commit is contained in:
parent
495fa6c648
commit
59f551171c
30
amiga/gui.c
30
amiga/gui.c
@ -485,47 +485,32 @@ void gui_init2(int argc, char** argv)
|
||||
scrn = LockPubScreen("Workbench");
|
||||
locked_screen = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* init shared bitmaps */
|
||||
/* init shared bitmaps */
|
||||
glob.bm = p96AllocBitMap(scrn->Width,scrn->Height,32,
|
||||
BMF_CLEAR | BMF_DISPLAYABLE | BMF_INTERLEAVED,
|
||||
scrn->RastPort.BitMap,RGBFB_A8R8G8B8);
|
||||
|
||||
if(!glob.bm)
|
||||
{
|
||||
warn_user("NoMemory","");
|
||||
//browser_window_destroy(bw);
|
||||
//return NULL;
|
||||
}
|
||||
if(!glob.bm) warn_user("NoMemory","");
|
||||
|
||||
InitRastPort(&glob.rp);
|
||||
glob.rp.BitMap = glob.bm;
|
||||
SetDrMd(&glob.rp,BGBACKFILL);
|
||||
|
||||
glob.layerinfo = NewLayerInfo();
|
||||
glob.rp.Layer = CreateUpfrontLayer(glob.layerinfo,glob.bm,0,0,scrn->Width-1,scrn->Height-1,0,NULL);
|
||||
glob.rp.Layer = CreateUpfrontLayer(glob.layerinfo,glob.bm,0,0,
|
||||
scrn->Width-1,scrn->Height-1,0,NULL);
|
||||
|
||||
glob.areabuf = AllocVec(100,MEMF_PRIVATE | MEMF_CLEAR);
|
||||
glob.rp.AreaInfo = AllocVec(sizeof(struct AreaInfo),MEMF_PRIVATE | MEMF_CLEAR);
|
||||
|
||||
if((!glob.areabuf) || (!glob.rp.AreaInfo))
|
||||
{
|
||||
warn_user("NoMemory","");
|
||||
//browser_window_destroy(bw);
|
||||
//return NULL;
|
||||
}
|
||||
if((!glob.areabuf) || (!glob.rp.AreaInfo)) warn_user("NoMemory","");
|
||||
|
||||
InitArea(glob.rp.AreaInfo,glob.areabuf,100/5);
|
||||
glob.rp.TmpRas = AllocVec(sizeof(struct TmpRas),MEMF_PRIVATE | MEMF_CLEAR);
|
||||
glob.tmprasbuf = AllocVec(scrn->Width*scrn->Height,MEMF_PRIVATE | MEMF_CLEAR);
|
||||
|
||||
if((!glob.tmprasbuf) || (!glob.rp.TmpRas))
|
||||
{
|
||||
warn_user("NoMemory","");
|
||||
//browser_window_destroy(bw);
|
||||
//return NULL;
|
||||
}
|
||||
if((!glob.tmprasbuf) || (!glob.rp.TmpRas)) warn_user("NoMemory","");
|
||||
|
||||
InitTmpRas(glob.rp.TmpRas,glob.tmprasbuf,scrn->Width*scrn->Height);
|
||||
currp = &glob.rp;
|
||||
@ -534,7 +519,8 @@ void gui_init2(int argc, char** argv)
|
||||
glob.surface = cairo_amigaos_surface_create(glob.bm);
|
||||
glob.cr = cairo_create(glob.surface);
|
||||
#endif
|
||||
/* init shared bitmaps */
|
||||
/* init shared bitmaps */
|
||||
}
|
||||
|
||||
if(argc) // argc==0 is started from wb
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user