Entt: [bug] assertion failed at: registry.get<>(entity, component)

Created on 12 Feb 2019  路  4Comments  路  Source: skypjack/entt

After latest update (master branch) I am experiencing "crash" at
registry: template<typename Component> Component & get(const entity_type entity, Component &&component)
when component not exsist (in the pools) yet.
assertion failed here:
assert(type<Component>() < pools.size() && pools[type<Component>()]);
(line 131)

bug

Most helpful comment

You're welcome. Thank you that pointed it out. I've also added a test to avoid the same error in future. :+1:

All 4 comments

Looks like there should be a call to assure instead of pool.

Uhu, my fault. @Kerndog73 was right, I put a pool<C> in the wrong place with the last changes. Fixed.

Uhu, my fault. @Kerndog73 was right, I put a pool<C> in the wrong place with the last changes. Fixed.

Thank you! :)

You're welcome. Thank you that pointed it out. I've also added a test to avoid the same error in future. :+1:

Was this page helpful?
0 / 5 - 0 ratings