Don't deallocate meshes on exit tree if the job is running.

This commit is contained in:
Relintai 2022-02-19 22:28:53 +01:00
parent 303343211f
commit 983090d21a

View File

@ -761,6 +761,11 @@ PropInstanceMerger::~PropInstanceMerger() {
_prop_data.unref();
_materials.clear();
free_meshes();
free_colliders();
meshes_clear();
colliders_clear();
}
void PropInstanceMerger::_notification(int p_what) {
@ -785,8 +790,13 @@ void PropInstanceMerger::_notification(int p_what) {
_job->set_cancelled(true);
}
if (!_building) {
free_meshes();
free_colliders();
meshes_clear();
colliders_clear();
}
break;
}
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {