As reported by @Freagarach on #5496, there can be broken behaviour as UnitMotion::PathResult may call RequestLongPath with an uninitialised path goal when ComputeGoal fails. To fix this, check the return value everywhere and react accordingly in case of failure. Fixes #5496 Differential Revision: https://code.wildfiregames.com/D2063 This was SVN commit r22458.