Skip to content

Commit 8f3fc9a

Browse files
committed
Address warning
1 parent 68ccf1b commit 8f3fc9a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/UniversalMenu.Driver.MenuManagerCS2/MenuManagerApiDriver.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ internal class Menu : IMenu, INavigateBackMenuExtension
9595

9696
void IMenu.Close()
9797
{
98+
if (MenuAPI.MenuManagerApi is null)
99+
throw new Exception("MenuManagerCS2 not found");
100+
98101
if (!IsActive)
99102
return;
100103
IsActive = false;
@@ -117,7 +120,7 @@ IMenuItem IMenu.CreateItem()
117120
void IMenu.Display()
118121
{
119122
if (MenuAPI.MenuManagerApi is null)
120-
throw new Exception("MenuManagerApi not found");
123+
throw new Exception("MenuManagerCS2 not found");
121124

122125
IsActive = true;
123126
if (TheMenu is not null)

0 commit comments

Comments
 (0)