diff options
author | Mikolaj Kaczmarek <m.kaczmarek9@gmail.com> | 2019-10-29 00:40:36 +0100 |
---|---|---|
committer | Mikolaj Kaczmarek <m.kaczmarek9@gmail.com> | 2019-10-29 00:53:48 +0100 |
commit | a245bab78d70cdcfd6651a9a973abbaadda4994c (patch) | |
tree | 340efb836d091913597281ec59df2481abd6a16b /scene/3d/cpu_particles.cpp | |
parent | 7d710a745e3eecbde482349fff78f0a4e14f6371 (diff) | |
download | redot-engine-a245bab78d70cdcfd6651a9a973abbaadda4994c.tar.gz |
Fixed disconnecting not connected signal
Diffstat (limited to 'scene/3d/cpu_particles.cpp')
-rw-r--r-- | scene/3d/cpu_particles.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp index 8766e30d0b..86daabefd2 100644 --- a/scene/3d/cpu_particles.cpp +++ b/scene/3d/cpu_particles.cpp @@ -1124,7 +1124,9 @@ void CPUParticles::_set_redraw(bool p_redraw) { VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, true); VS::get_singleton()->multimesh_set_visible_instances(multimesh, -1); } else { - VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread"); + if (VS::get_singleton()->is_connected("frame_pre_draw", this, "_update_render_thread")) { + VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread"); + } VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, false); VS::get_singleton()->multimesh_set_visible_instances(multimesh, 0); } |