From 7fd52045079323f253d6bf1af1325d085b000a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillem=20Sunyer=20Cald=C3=BA?= Date: Sun, 27 Mar 2022 22:22:42 +0200 Subject: [PATCH] Nullref --- Runtime/Ui/ViewStack/Instructions/HideInstruction.cs | 1 + .../ViewStack/Instructions/MoveCurrentToForegroundInstruction.cs | 1 + Runtime/Ui/ViewStack/Instructions/SetInteractableInstruction.cs | 1 - Runtime/Ui/ViewStack/Instructions/ShowInstruction.cs | 1 - 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Ui/ViewStack/Instructions/HideInstruction.cs b/Runtime/Ui/ViewStack/Instructions/HideInstruction.cs index 4db76d4..d37ac35 100644 --- a/Runtime/Ui/ViewStack/Instructions/HideInstruction.cs +++ b/Runtime/Ui/ViewStack/Instructions/HideInstruction.cs @@ -59,6 +59,7 @@ protected override async Task OnExecute(CancellationToken cancellationToken) { UnityEngine.Debug.LogError($"Tried to Hide {nameof(entry.Id)} as Popup, " + $"but it there was not a current view context, at {nameof(HideInstruction)}"); + return; } if (entry.IsPopup) diff --git a/Runtime/Ui/ViewStack/Instructions/MoveCurrentToForegroundInstruction.cs b/Runtime/Ui/ViewStack/Instructions/MoveCurrentToForegroundInstruction.cs index 6744378..a7ffdaa 100644 --- a/Runtime/Ui/ViewStack/Instructions/MoveCurrentToForegroundInstruction.cs +++ b/Runtime/Ui/ViewStack/Instructions/MoveCurrentToForegroundInstruction.cs @@ -32,6 +32,7 @@ protected override void OnInstantExecute() { UnityEngine.Debug.LogError($"Tried to MoveCurrentToForeground " + $"but it there was not a current view context, at {nameof(MoveCurrentToForegroundInstruction)}"); + return; } bool found = entriesRepository.TryGet(context.ViewId, out IViewStackEntry entry); diff --git a/Runtime/Ui/ViewStack/Instructions/SetInteractableInstruction.cs b/Runtime/Ui/ViewStack/Instructions/SetInteractableInstruction.cs index c07315b..d45960f 100644 --- a/Runtime/Ui/ViewStack/Instructions/SetInteractableInstruction.cs +++ b/Runtime/Ui/ViewStack/Instructions/SetInteractableInstruction.cs @@ -34,7 +34,6 @@ protected override void OnInstantExecute() { UnityEngine.Debug.LogError($"Tried to SetInteractable {nameof(IViewStackEntry)} of type {entryId}, " + $"but it was not registered, at {nameof(SetInteractableInstruction)}"); - return; } diff --git a/Runtime/Ui/ViewStack/Instructions/ShowInstruction.cs b/Runtime/Ui/ViewStack/Instructions/ShowInstruction.cs index 35564fa..0fbfe05 100644 --- a/Runtime/Ui/ViewStack/Instructions/ShowInstruction.cs +++ b/Runtime/Ui/ViewStack/Instructions/ShowInstruction.cs @@ -40,7 +40,6 @@ protected async override Task OnExecute(CancellationToken cancellationToken) { UnityEngine.Debug.LogError($"Tried to Show {nameof(IViewStackEntry)} of type {entryId}, " + $"but it was not registered, at {nameof(ShowInstruction)}"); - return; }