added 1 null check

top tier commit
This commit is contained in:
Lan
2022-11-06 00:15:04 +02:00
parent a4f9dc1b7a
commit f0eadb0a16

View File

@@ -631,7 +631,7 @@ namespace Kehyeedra3.Commands
int itemid = 0;
int itemnum = 0;
if (!itemlist.Any(i => (int)i.Id == (int.Parse(sec))))
if (sec != null && !itemlist.Any(i => (int)i.Id == (int.Parse(sec))) )
{
sec = null;
}