Fix crash when deleting buildings.

Can't check getHasDirectionLockAvailable() on a building you are currently deleting because it doesn't exist.
This commit is contained in:
Derek Hoagland 2020-06-16 16:04:10 -04:00 committed by GitHub
parent bbd50fdce9
commit ddb5aae327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -162,6 +162,7 @@ export class HUDBuildingPlacer extends BaseHUDPart {
// Check for direction lock
if (
metaBuilding &&
metaBuilding.getHasDirectionLockAvailable() &&
this.root.keyMapper.getBinding(KEYMAPPINGS.placement.lockBeltDirection).isCurrentlyPressed()
) {