Prevent sparse output connector list from causing disowned events
This commit is contained in:
parent
91ec8ef423
commit
0967e9eb85
|
@ -35,6 +35,11 @@ handle_event(EventPositionBase * self, EventNode * event)
|
|||
}
|
||||
for (size_t i = 0; i < count; ++i) {
|
||||
event->position = &node->as_GraphNode.outputs.elements[i]->as_EventPositionBase;
|
||||
if (!event->position) {
|
||||
EventNode *orphaned = event;
|
||||
event = orphaned->prev;
|
||||
event_destroy(orphaned);
|
||||
}
|
||||
event = event->next;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -25,6 +25,11 @@ handle_event(EventPositionBase * self, EventNode * event)
|
|||
}
|
||||
for (size_t i = 0; i < count; ++i) {
|
||||
event->position = &node->as_GraphNode.outputs.elements[i]->as_EventPositionBase;
|
||||
if (!event->position) {
|
||||
EventNode *orphaned = event;
|
||||
event = orphaned->prev;
|
||||
event_destroy(orphaned);
|
||||
}
|
||||
event = event->next;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -22,6 +22,11 @@ handle_event(EventPositionBase * self, EventNode * event)
|
|||
}
|
||||
for (size_t i = 0; i < count; ++i) {
|
||||
event->position = &node->as_GraphNode.outputs.elements[i]->as_EventPositionBase;
|
||||
if (!event->position) {
|
||||
EventNode *orphaned = event;
|
||||
event = orphaned->prev;
|
||||
event_destroy(orphaned);
|
||||
}
|
||||
event = event->next;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -17,7 +17,11 @@ handle_event(EventPositionBase * self, EventNode * event)
|
|||
}
|
||||
if (event_predicate_apply(node->predicates[i], event) == EVPREDRES_ACCEPTED) {
|
||||
if (event_replicate(event, 1)) {
|
||||
event->next->position = &node->as_GraphNode.outputs.elements[i]->as_EventPositionBase;
|
||||
EventNode * replica = event->next;
|
||||
replica->position = &node->as_GraphNode.outputs.elements[i]->as_EventPositionBase;
|
||||
if (!replica->position) {
|
||||
event_destroy(replica);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,11 @@ handle_event(EventPositionBase * self, EventNode * event)
|
|||
}
|
||||
for (size_t i = 0; i < count; ++i) {
|
||||
event->position = &node->as_GraphNode.outputs.elements[i]->as_EventPositionBase;
|
||||
if (!event->position) {
|
||||
EventNode *orphaned = event;
|
||||
event = orphaned->prev;
|
||||
event_destroy(orphaned);
|
||||
}
|
||||
event = event->next;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -15,6 +15,11 @@ handle_event(EventPositionBase * self, EventNode * event)
|
|||
}
|
||||
for (size_t i = 0; i < count; ++i) {
|
||||
event->position = &node->outputs.elements[i]->as_EventPositionBase;
|
||||
if (!event->position) {
|
||||
EventNode *orphaned = event;
|
||||
event = orphaned->prev;
|
||||
event_destroy(orphaned);
|
||||
}
|
||||
event = event->next;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue