From 540ddbc33beb804acde2fbe533a7f832fd2e4c21 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 21 Dec 2021 10:37:08 +0100 Subject: Fix being unable to clear some theme overrides --- scene/gui/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene') 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)) { -- cgit v1.2.3