File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4609,7 +4609,11 @@ bool ecs_each_next(
4609
4609
it->table = table;
4610
4610
it->count = ecs_table_count(table);
4611
4611
it->entities = ecs_table_entities(table);
4612
- it->ids = &table->type.array[next->index];
4612
+ if (next->index != -1) {
4613
+ it->ids = &table->type.array[next->index];
4614
+ } else {
4615
+ it->ids = NULL;
4616
+ }
4613
4617
it->trs = &each_iter->trs;
4614
4618
it->sources = &each_iter->sources;
4615
4619
it->sizes = &each_iter->sizes;
Original file line number Diff line number Diff line change @@ -55,7 +55,11 @@ bool ecs_each_next(
55
55
it -> table = table ;
56
56
it -> count = ecs_table_count (table );
57
57
it -> entities = ecs_table_entities (table );
58
- it -> ids = & table -> type .array [next -> index ];
58
+ if (next -> index != -1 ) {
59
+ it -> ids = & table -> type .array [next -> index ];
60
+ } else {
61
+ it -> ids = NULL ;
62
+ }
59
63
it -> trs = & each_iter -> trs ;
60
64
it -> sources = & each_iter -> sources ;
61
65
it -> sizes = & each_iter -> sizes ;
You can’t perform that action at this time.
0 commit comments