1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Fixed disconnecting not connected signal

This commit is contained in:
Mikolaj Kaczmarek
2019-10-29 00:40:36 +01:00
parent 7d710a745e
commit a245bab78d
5 changed files with 15 additions and 6 deletions

View File

@@ -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);