mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix potential nullptr dereference (#15134)
This commit is contained in:
parent
62d66ca9d0
commit
43b7c3a204
|
@ -265,8 +265,11 @@ GameActions::Result::Ptr LargeSceneryPlaceAction::Execute() const
|
|||
{ curTile, zLow, zHigh }, &map_place_scenery_clear_func, quarterTile, GetFlags(), CREATE_CROSSING_MODE_NONE,
|
||||
isTree);
|
||||
if (canBuild->Error != GameActions::Status::Ok)
|
||||
{
|
||||
if (banner != nullptr)
|
||||
{
|
||||
DeleteBanner(banner->id);
|
||||
}
|
||||
canBuild->ErrorTitle = STR_CANT_POSITION_THIS_HERE;
|
||||
return canBuild;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue