mirror of
https://github.com/Relintai/props.git
synced 2025-03-12 18:28:52 +01:00
Also check whether a job is valid before calling enter tree on it.
This commit is contained in:
parent
10dbb857ce
commit
deb664c781
@ -124,7 +124,7 @@ Ref<PropInstanceJob> PropInstanceMerger::get_job() {
|
|||||||
void PropInstanceMerger::set_job(const Ref<PropInstanceJob> &job) {
|
void PropInstanceMerger::set_job(const Ref<PropInstanceJob> &job) {
|
||||||
_job = job;
|
_job = job;
|
||||||
|
|
||||||
if (is_inside_tree()) {
|
if (_job.is_valid() && is_inside_tree()) {
|
||||||
_job->prop_instance_enter_tree();
|
_job->prop_instance_enter_tree();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user