mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix the bam crash for real this time.
This commit is contained in:
parent
6f8c011bb3
commit
9f094d495a
@ -334,12 +334,9 @@ resolve() {
|
|||||||
}
|
}
|
||||||
_created_objs_by_pointer.erase(object_ptr);
|
_created_objs_by_pointer.erase(object_ptr);
|
||||||
|
|
||||||
Finalize::iterator fi = _finalize_list.find(object_ptr);
|
// Remove the pointer from the finalize list (the new
|
||||||
if (fi != _finalize_list.end()) {
|
// pointer presumably doesn't require finalizing).
|
||||||
// Change the pointer in the finalize list.
|
_finalize_list.erase(object_ptr);
|
||||||
_finalize_list.erase(fi);
|
|
||||||
_finalize_list.insert(new_ptr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
created_obj._ptr = new_ptr;
|
created_obj._ptr = new_ptr;
|
||||||
created_obj._change_this = NULL;
|
created_obj._change_this = NULL;
|
||||||
@ -984,15 +981,16 @@ p_read_object() {
|
|||||||
if (ri == _object_pointers.end()) {
|
if (ri == _object_pointers.end()) {
|
||||||
Finalize::iterator fi = _finalize_list.find((TypedWritable *)object);
|
Finalize::iterator fi = _finalize_list.find((TypedWritable *)object);
|
||||||
|
|
||||||
object = created_obj._change_this(object, this);
|
TypedWritable *new_ptr = created_obj._change_this(object, this);
|
||||||
created_obj._ptr = object;
|
created_obj._ptr = new_ptr;
|
||||||
created_obj._change_this = NULL;
|
created_obj._change_this = NULL;
|
||||||
|
|
||||||
if (fi != _finalize_list.end()) {
|
// Remove the pointer from the finalize list (the new
|
||||||
// Change the pointer in the finalize list.
|
// pointer presumably doesn't require finalizing).
|
||||||
_finalize_list.erase(fi);
|
if (new_ptr != object) {
|
||||||
_finalize_list.insert(object);
|
_finalize_list.erase(object);
|
||||||
}
|
}
|
||||||
|
object = new_ptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user