mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix a null pointer access in Polymer mouse picking.
Specifically, it was in the "determine searchwall when aiming at floor or ceiling" part. Now, if prsectors[]->ceil.plane (or ->floor.plane) is NULL, we set the searchwall to the sector's firstwall and return. git-svn-id: https://svn.eduke32.com/eduke32@2610 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4322dff22c
commit
059e8ebe52
1 changed files with 8 additions and 2 deletions
|
@ -1204,9 +1204,15 @@ void polymer_editorpick(void)
|
|||
else
|
||||
{
|
||||
if (searchstat==1)
|
||||
pl = &(prsectors[searchsector]->ceil.plane[0]);
|
||||
pl = prsectors[searchsector]->ceil.plane;
|
||||
else
|
||||
pl = &(prsectors[searchsector]->floor.plane[0]);
|
||||
pl = prsectors[searchsector]->floor.plane;
|
||||
|
||||
if (pl == NULL)
|
||||
{
|
||||
searchwall = sector[num].wallptr;
|
||||
return;
|
||||
}
|
||||
|
||||
t = dot3f(pl,scrv);
|
||||
svcoeff = -(dot3f(pl,scr)+pl[3])/t;
|
||||
|
|
Loading…
Reference in a new issue