mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 13:01:29 -10:00
* Adds safety checks to scripting orders with waypoints Turns out setting a waypoint order then trying to get to target of that order in the same frame triggers a crash in the scripting API for ship orders (`order.cpp` line 295). This was due to invalid lookups which lacked safety checks. This PR adds those safety checks. Now, if this situation is encountered, it leaves `objnum` at -1 and thus returns an object for which `isValid` is false. Fix is tested and works as expected. Also fixes #5172 * appease clang * cleanup thanks to Goober * clang again * forgot to re-add the nullptr * remove redundant checks