GuillaumeDua / GGE

Guss' s Game Engine
Apache License 2.0
0 stars 0 forks source link

Error : Entity<T>::OnCollision (T_OnCollisionEvents_CB) : Trigger an std::exception [bad function call] catched in GGE::Game::Update #7

Closed GuillaumeDua closed 8 years ago

GuillaumeDua commented 8 years ago

Probable cause is std::vectorstd::function initialized by default in GGE::Entity NB same issue if [this] capture is removed in lambda (std::vector::value_type) as default initialization

GuillaumeDua commented 8 years ago

Fixed : Default constructor call that assign std::map with a mapped_type like std::function using an initializer_list created a garbage map. Result is a call to an std::null_ptr.