TorchAPI / Essentials

A Torch plugin that adds must-have utilities and administration tools to Space Engineers dedicated servers.
23 stars 31 forks source link

Null-Check for GeneratorInstance #177

Closed LordTylus closed 3 years ago

LordTylus commented 3 years ago

If SEWorldGenerator Plugin is used or Procedural Seed is 0 there will be no GeneratorInstance. In this case this Method will NRE.

However we still would like to delete stuff. So just return null. Because when there is no GeneratorInstance we dont have to tell itentities are being deleted.

Luckily the IDisposable in the using() block is Nullable :-)

Kontu Tested that stuff and was pleased that it worked