mirror of
https://github.com/Relintai/props.git
synced 2024-11-14 10:17:30 +01:00
Don't deallocate meshes on exit tree if the job is running.
This commit is contained in:
parent
303343211f
commit
983090d21a
@ -761,6 +761,11 @@ PropInstanceMerger::~PropInstanceMerger() {
|
|||||||
_prop_data.unref();
|
_prop_data.unref();
|
||||||
|
|
||||||
_materials.clear();
|
_materials.clear();
|
||||||
|
|
||||||
|
free_meshes();
|
||||||
|
free_colliders();
|
||||||
|
meshes_clear();
|
||||||
|
colliders_clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropInstanceMerger::_notification(int p_what) {
|
void PropInstanceMerger::_notification(int p_what) {
|
||||||
@ -785,8 +790,13 @@ void PropInstanceMerger::_notification(int p_what) {
|
|||||||
_job->set_cancelled(true);
|
_job->set_cancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_meshes();
|
if (!_building) {
|
||||||
free_colliders();
|
free_meshes();
|
||||||
|
free_colliders();
|
||||||
|
meshes_clear();
|
||||||
|
colliders_clear();
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
|
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
|
||||||
|
Loading…
Reference in New Issue
Block a user