public static void RemoveLight(MyLight light) { if (light != null) { light.Clear(); m_preallocatedLights.Deallocate(light); } }
public static void RemoveLight(MyLight light) { if (light != null) { light.Clear(); //by Gregory: added null check happened once when unloading session if (m_preallocatedLights != null) { m_preallocatedLights.Deallocate(light); } } }