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/2d/cpu_particles_2d.cpp | |
parent | 7d710a745e3eecbde482349fff78f0a4e14f6371 (diff) | |
download | redot-engine-a245bab78d70cdcfd6651a9a973abbaadda4994c.tar.gz |
Fixed disconnecting not connected signal
Diffstat (limited to 'scene/2d/cpu_particles_2d.cpp')
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 07f3e10244..372d8f614b 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -1037,7 +1037,9 @@ void CPUParticles2D::_set_redraw(bool p_redraw) { 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()->canvas_item_set_update_when_visible(get_canvas_item(), false); VS::get_singleton()->multimesh_set_visible_instances(multimesh, 0); |