mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
- Fix invalid polymer light array access originating from game's cleanup
callback 'G_Polymer_UnInit'. - In astub.c, reset spritelightid to -1 when nulling the spritelightptr of a sprite (no crashes observed, just precaution) - In sdlayer.c, catch SIGILLs with our signal handler too, since illegal instructions are what the instrumented debug builds will execute when attempting to carry out an undefined (per C) operation. git-svn-id: https://svn.eduke32.com/eduke32@2169 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
20d303ed15
commit
151287168c
3 changed files with 4 additions and 1 deletions
|
@ -319,6 +319,7 @@ int32_t initsystem(void)
|
|||
}
|
||||
|
||||
signal(SIGSEGV, sighandler);
|
||||
signal(SIGILL, sighandler); /* clang -fcatch-undefined-behavior uses an ill. insn */
|
||||
signal(SIGABRT, sighandler);
|
||||
signal(SIGFPE, sighandler);
|
||||
|
||||
|
|
|
@ -487,7 +487,8 @@ int32_t block_deletesprite = 0;
|
|||
#ifdef POLYMER
|
||||
static void A_DeletePolymerLight(int32_t s)
|
||||
{
|
||||
polymer_deletelight(actor[s].lightId);
|
||||
if (actor[s].lightId >= 0)
|
||||
polymer_deletelight(actor[s].lightId);
|
||||
actor[s].lightId = -1;
|
||||
actor[s].lightptr = NULL;
|
||||
}
|
||||
|
|
|
@ -315,6 +315,7 @@ static void DeletePolymerLights(void)
|
|||
if (spritelightptr[i] != NULL)
|
||||
{
|
||||
polymer_deletelight(spritelightid[i]);
|
||||
spritelightid[i] = -1;
|
||||
spritelightptr[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue