Skip to content

Commit acfffc7

Browse files
committed
Moar nullchecks
1 parent c25db5c commit acfffc7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎Concealment/ConcealGroup.cs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ private void DisableProjectors(MyCubeGrid grid)
145145

146146
public void EnableProjectors()
147147
{
148-
foreach (var projector in _projectors.Select(x => (MyProjectorBase)MyEntities.GetEntityById(x)))
148+
foreach (var projector in _projectors.Select(x => MyEntities.GetEntityById(x) as MyProjectorBase))
149149
{
150+
if (projector == null)
151+
continue;
152+
150153
projector.Enabled = true;
151154
}
152155
_projectors.Clear();

0 commit comments

Comments
 (0)