Structure: Improved SetBasement

The access to editor actions poses a problem sometime when deleting
basements.
install-platforms
Mark 2017-08-27 10:40:44 +02:00
parent 3e26d4258a
commit d1996e45df
1 changed files with 7 additions and 4 deletions

View File

@ -103,10 +103,13 @@ private func EjectContentsOnDestruction(int cause, int by_player)
public func SetBasement(object to_basement)
{
lib_structure.basement = to_basement;
if (lib_structure.basement)
this.EditorActions.basement = nil;
else
this.EditorActions.basement = new GetID().EditorActions.basement {};
if (this.EditorActions)
{
if (lib_structure.basement)
this.EditorActions.basement = nil;
else
this.EditorActions.basement = new GetID().EditorActions.basement {};
}
return;
}