From 05f5a43cad08fa98e6a7225011186ec8b2b9ea2a Mon Sep 17 00:00:00 2001 From: sps1112 Date: Fri, 5 Mar 2021 21:47:22 +0530 Subject: Fix Control._edit_set_state crash --- scene/gui/control.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scene') diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index bff3024e38..f188e63743 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -73,6 +73,9 @@ Dictionary Control::_edit_get_state() const { } void Control::_edit_set_state(const Dictionary &p_state) { + ERR_FAIL_COND((p_state.size() <= 0) || + !p_state.has("rotation") || !p_state.has("scale") || + !p_state.has("pivot") || !p_state.has("anchors") || !p_state.has("offsets")); Dictionary state = p_state; set_rotation(state["rotation"]); -- cgit v1.2.3