Describe the bug
When removing the last munition of a single type from a VLS mount or magazine an NRE is shown.
To Reproduce
Steps to reproduce the behavior:
Add a VLS or magazine to a ship in fleet editor.
Add any single ammo type or missile.
Remove that ammo or missile with the '-' button.
NRE is shows
Expected behavior
Error should not appear when removing items from VLS or magazines.
Attachments
Error log attached
NullReferenceException: Object reference not set to an instance of an object
at FleetEditor.SettingsMagazineLoadout.ChangeMagazineQuantity (FleetEditor.MagazineAmmoItem magItem, System.UInt32 quantity) [0x0003f] in D:\Projects\Unity\Nebulous\Assets\Source\FleetEditor\SettingsMagazineLoadout.cs:118
at FleetEditor.MagazineAmmoItem.HandleValueChanged (System.Int32 newValue) [0x00001] in D:\Projects\Unity\Nebulous\Assets\Source\FleetEditor\MagazineAmmoItem.cs:67
at UI.Spinner.SetValueInt (System.Int32 value, System.Boolean fireEvent) [0x00043] in D:\Projects\Unity\Nebulous\Assets\Source\UI\Spinner.cs:78
at UI.Spinner.HandleDownButton () [0x00044] in D:\Projects\Unity\Nebulous\Assets\Source\UI\Spinner.cs:113
at UnityEngine.Events.InvokableCall.Invoke () [0x00010] in C:\buildslave\unity\build\Runtime\Export\UnityEvent\UnityEvent.cs:180
at UnityEngine.Events.UnityEvent.Invoke () [0x00022] in C:\buildslave\unity\build\Runtime\Export\UnityEvent\UnityEvent\UnityEvent_0.cs:58
at UnityEngine.UI.Button.Press () [0x00027] in D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\UI\Core\Button.cs:68
at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00010] in D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\UI\Core\Button.cs:110
at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00001] in D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\ExecuteEvents.cs:50
at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00074] in D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\ExecuteEvents.cs:262
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1) (at D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\ExecuteEvents.cs:266)
UnityEngine.EventSystems.StandaloneInputModule:ReleaseMouse(PointerEventData, GameObject) (at D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:187)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData) (at D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:642)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32) (at D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:548)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent() (at D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:528)
UnityEngine.EventSystems.StandaloneInputModule:Process() (at D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:282)
UnityEngine.EventSystems.EventSystem:Update() (at D:\Projects\Unity\Nebulous\Library\PackageCache\com.unity.ugui@1.0.0\Runtime\EventSystem\EventSystem.cs:385)
Describe the bug When removing the last munition of a single type from a VLS mount or magazine an NRE is shown.
To Reproduce Steps to reproduce the behavior:
Expected behavior Error should not appear when removing items from VLS or magazines.
Attachments Error log attached