diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-10-29 12:01:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-29 12:01:01 +0100 |
commit | 0641acc576c138f592771c0cd3b0e7dc8212d1ae (patch) | |
tree | 51aab4e2dfd5ba8c49cd5e7ed25e6caee9a8544e /scene/2d | |
parent | f480d1c3b738d0f5be57fc35cc7f67743d5afa01 (diff) | |
parent | a245bab78d70cdcfd6651a9a973abbaadda4994c (diff) |
Merge pull request #33147 from mikkac/33135
Fixed disconnecting not connected signal
Diffstat (limited to 'scene/2d')
-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); |