You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Fix crash when editing pinned StyleBox
(cherry picked from commit 4b013a9c96)
This commit is contained in:
committed by
Rémi Verschelde
parent
214a00ca2e
commit
59151db99e
@@ -2852,11 +2852,13 @@ void ThemeTypeEditor::_update_stylebox_from_leading() {
|
|||||||
edited_theme->get_stylebox_list(edited_type, &names);
|
edited_theme->get_stylebox_list(edited_type, &names);
|
||||||
List<Ref<StyleBox>> styleboxes;
|
List<Ref<StyleBox>> styleboxes;
|
||||||
for (List<StringName>::Element *E = names.front(); E; E = E->next()) {
|
for (List<StringName>::Element *E = names.front(); E; E = E->next()) {
|
||||||
if (E->get() == leading_stylebox.item_name) {
|
Ref<StyleBox> sb = edited_theme->get_stylebox(E->get(), edited_type);
|
||||||
|
|
||||||
|
// Avoid itself, stylebox can be shared between items.
|
||||||
|
if (sb == leading_stylebox.stylebox) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<StyleBox> sb = edited_theme->get_stylebox(E->get(), edited_type);
|
|
||||||
if (sb->get_class() == leading_stylebox.stylebox->get_class()) {
|
if (sb->get_class() == leading_stylebox.stylebox->get_class()) {
|
||||||
styleboxes.push_back(sb);
|
styleboxes.push_back(sb);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user