Check for null id

This commit is contained in:
duncanspumpkin 2019-02-07 11:41:54 +00:00
parent 5e319a4a37
commit bca79da193
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public:
GameActionResult::Ptr Query() const override
{
if (_rideIndex >= MAX_RIDES)
if (_rideIndex >= MAX_RIDES || _rideIndex == RIDE_ID_NULL)
{
log_warning("Invalid game command for ride %u", _rideIndex);
return std::make_unique<GameActionResult>(GA_ERROR::INVALID_PARAMETERS, STR_NONE);