mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-03 17:13:16 +00:00
1. Added NULL reference check
2. Removed suspend/resume duktape call
This commit is contained in:
@@ -6343,6 +6343,11 @@ void ILibLifeTime_AddEx(void *LifetimeMonitorObject,void *data, int ms, ILibLife
|
||||
struct ILibLifeTime *LifeTimeMonitor = (struct ILibLifeTime*)LifetimeMonitorObject;
|
||||
void *node;
|
||||
|
||||
if (LifetimeMonitorObject == NULL)
|
||||
{
|
||||
if (Destroy != NULL) { Destroy(data); }
|
||||
return;
|
||||
}
|
||||
if ((ltms = (struct LifeTimeMonitorData*)malloc(sizeof(struct LifeTimeMonitorData))) == NULL) ILIBCRITICALEXIT(254);
|
||||
memset(ltms,0,sizeof(struct LifeTimeMonitorData));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user