mirror of https://github.com/OpenRCT2/OpenRCT2.git
Check for null id
This commit is contained in:
parent
5e319a4a37
commit
bca79da193
|
@ -69,7 +69,7 @@ public:
|
||||||
|
|
||||||
GameActionResult::Ptr Query() const override
|
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);
|
log_warning("Invalid game command for ride %u", _rideIndex);
|
||||||
return std::make_unique<GameActionResult>(GA_ERROR::INVALID_PARAMETERS, STR_NONE);
|
return std::make_unique<GameActionResult>(GA_ERROR::INVALID_PARAMETERS, STR_NONE);
|
||||||
|
|
Loading…
Reference in New Issue