LGhassen / EnvironmentalVisualEnhancements

Visual enhancements including clouds, lights, etc.
79 stars 9 forks source link

NRE in Atmosphere.CloudsPQS+<DelayedCheckForSphereInactive> #21

Closed BrettRyland closed 2 years ago

BrettRyland commented 2 years ago

I've seen this exception appear in various KSP.log files, so I went and had a look at it:

[EXC 23:53:16.008] NullReferenceException: Object reference not set to an instance of an object
        Atmosphere.CloudsPQS+<DelayedCheckForSphereInactive>d__28.MoveNext () (at /storage/github/EnvironmentalVisualEnhancements/Atmosphere/CloudsPQS.cs:390)
        UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <2425394cf09642369e2109953e31f62b>:0)
        UnityEngine.DebugLogHandler:LogException(Exception, Object)
        ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
        UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

It's being caused by layer2D being null in that check when loading into the flight scene.

LGhassen commented 2 years ago

Thanks I will check it out