From d5fa7185ca6d68075745aad9febf0e99463acce5 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Mon, 18 Mar 2019 21:50:29 +0000 Subject: [PATCH] Prevent a crash when bad data passed --- src/openrct2/interface/InteractiveConsole.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index fa0ab0761f..2070f84dae 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -417,8 +417,11 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) { console.WriteFormatLine("This command expects the string all or two integer arguments"); } - auto rideSetPrice = RideSetPriceAction(rideId, price, true); - GameActions::Execute(&rideSetPrice); + else + { + auto rideSetPrice = RideSetPriceAction(rideId, price, true); + GameActions::Execute(&rideSetPrice); + } } } }