diff options
author | kobewi <kobewi4e@gmail.com> | 2021-12-21 10:37:08 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-12-21 10:37:08 +0100 |
commit | 540ddbc33beb804acde2fbe533a7f832fd2e4c21 (patch) | |
tree | 1066d98219bf7e77479cbe718feb1b953baedb77 | |
parent | 5ffee633cd83a0a607c27be1664f9ac0ba244a27 (diff) |
Fix being unable to clear some theme overrides
-rw-r--r-- | scene/gui/control.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 1fdc30eb6d..9bffc2e0e4 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -240,7 +240,7 @@ bool Control::_set(const StringName &p_name, const Variant &p_value) { return false; } - if (p_value.get_type() == Variant::NIL) { + if (p_value.get_type() == Variant::NIL || (p_value.get_type() == Variant::OBJECT && (Object *)p_value == nullptr)) { if (name.begins_with("theme_override_icons/") || name.begins_with("custom_icons/")) { String dname = name.get_slicec('/', 1); if (data.icon_override.has(dname)) { |