fix segfault (the graphic and the core used the same list of entities and when one was destroy in the core it was still in the graphic)