Skip to content

Null-Check for GeneratorInstance#177

Merged
Bishbash777 merged 1 commit intoTorchAPI:masterfrom
LordTylus:cleanupSeWorldGenPlugin
Mar 7, 2021
Merged

Null-Check for GeneratorInstance#177
Bishbash777 merged 1 commit intoTorchAPI:masterfrom
LordTylus:cleanupSeWorldGenPlugin

Conversation

@LordTylus
Copy link
Copy Markdown
Contributor

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

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 :-)
@Bishbash777 Bishbash777 merged commit abdb5c5 into TorchAPI:master Mar 7, 2021
dorimanx pushed a commit to dorimanx/Essentials that referenced this pull request Jun 17, 2021
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 :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants