mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Don't try catch
This commit is contained in:
parent
58fca35df6
commit
9778ecd7c8
@ -40,14 +40,12 @@ namespace NewHorizons.Handlers
|
||||
{
|
||||
foreach (var gameObject in toDisable)
|
||||
{
|
||||
// Somehow SetActive can NRE
|
||||
// Seems to only happen if they don't have the DLC installed
|
||||
// Even with the null check it's complaining so I don't understand at all
|
||||
try
|
||||
// The gameObject can be null, seems to only happen if they don't have the DLC installed
|
||||
// null coalesence doesn't work with game objects so don't use it here
|
||||
if (gameObject != null)
|
||||
{
|
||||
gameObject?.SetActive(false);
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
// Kill all non nh proxies
|
||||
foreach (var proxy in GameObject.FindObjectsOfType<ProxyBody>())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user