Add checks against fulfill nil values

This commit is contained in:
Alessandro Proto 2023-03-17 22:38:25 +01:00
parent 4a9d2bad34
commit 44437e84f1
2 changed files with 5 additions and 0 deletions

View file

@ -194,6 +194,7 @@ public class Event : IComponent
var task = TaskMeta.CheckTask(L, false);
L.CheckAny(2);
L.ArgumentCheck(!L.IsNil(2), 2, "value cannot be nil");
if(!task.UserTask)
{

View file

@ -64,6 +64,10 @@ public class TaskMeta : IComponent
var container = tasks.NewThread();
lk(container);
if(container.IsNil(-1))
{
throw new Exception("Task result cannot be nil");
}
container.XMove(tasks, 1);
tasks.Remove(-2);
var emptySpot = FindSpot();