forked from rosebudai/OpenRCT2-Web
Fix potential nullptr dereference (#15134)
This commit is contained in:
1 parent
62d66ca9d0
commit
43b7c3a204
1 file changed
+4
-1
@@ -266,7 +266,10 @@ GameActions::Result::Ptr LargeSceneryPlaceAction::Execute() const
|
||||
isTree);
|
||||
if (canBuild->Error != GameActions::Status::Ok)
|
||||
{
|
||||
DeleteBanner(banner->id);
|
||||
if (banner != nullptr)
|
||||
{
|
||||
DeleteBanner(banner->id);
|
||||
}
|
||||
canBuild->ErrorTitle = STR_CANT_POSITION_THIS_HERE;
|
||||
return canBuild;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user