Fix a crash when saving a game from Hyperspace encounter screen

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3547 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2010-06-02 21:11:00 +00:00
parent a9d2bb1613
commit 81d98c6b2e
+4
View File
@@ -1740,6 +1740,10 @@ SaveSisHyperState (void)
// Update 'GLOBAL (ShipFacing)' to the direction the flagship is facing
hSisElement = getSisElement ();
if (!hSisElement)
{ // Happens when saving a game from Hyperspace encounter screen
return;
}
//if (ElementPtr->state_flags & PLAYER_SHIP)
LockElement (hSisElement, &ElementPtr);
GetElementStarShip (ElementPtr, &StarShipPtr);