Do not crash if someone sends you a research status message with a valid building ID

but which does not correspond to a research building. Reported by Toksyuryel in ticket:1021.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8334 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2009-10-31 19:44:58 +00:00 committed by Git SVN Gateway
parent dbe7ee4209
commit 289a73d103
1 changed files with 1 additions and 1 deletions

View File

@ -948,7 +948,7 @@ BOOL recvResearchStatus()
psBuilding = IdToStruct(structRef, player);
// Set that facility to research
if (psBuilding)
if (psBuilding && psBuilding->pFunctionality)
{
psResFacilty = (RESEARCH_FACILITY *) psBuilding->pFunctionality;