diff --git a/src/object/class.cpp b/src/object/class.cpp index 8bb462ce..e03d4e00 100644 --- a/src/object/class.cpp +++ b/src/object/class.cpp @@ -333,8 +333,9 @@ namespace objects for (instance_holder* p = kill_me->objects, *next; p != 0; p = next) { next = p->next(); + void* q = dynamic_cast(p); p->~instance_holder(); - instance_holder::deallocate(inst, dynamic_cast(p)); + instance_holder::deallocate(inst, q); } // Python 2.2.1 won't add weak references automatically when