summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsps1112 <sidps1112@gmail.com>2021-03-05 21:47:22 +0530
committersps1112 <sidps1112@gmail.com>2021-03-05 21:52:34 +0530
commit05f5a43cad08fa98e6a7225011186ec8b2b9ea2a (patch)
treeb66d1353869f71dbeb84ce2076738a0c23f0f3b6
parent4de0768cdbaf68781214601e679548a69c15c673 (diff)
Fix Control._edit_set_state crash
-rw-r--r--scene/gui/control.cpp3
1 files changed, 3 insertions, 0 deletions
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"]);