mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 22:23:04 +00:00
Fix crash when editing pinned StyleBox
This commit is contained in:
parent
396def9b66
commit
4b013a9c96
@ -3211,11 +3211,13 @@ void ThemeTypeEditor::_update_stylebox_from_leading() {
|
||||
edited_theme->get_stylebox_list(edited_type, &names);
|
||||
List<Ref<StyleBox>> styleboxes;
|
||||
for (const StringName &E : names) {
|
||||
if (E == leading_stylebox.item_name) {
|
||||
Ref<StyleBox> sb = edited_theme->get_stylebox(E, edited_type);
|
||||
|
||||
// Avoid itself, stylebox can be shared between items.
|
||||
if (sb == leading_stylebox.stylebox) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Ref<StyleBox> sb = edited_theme->get_stylebox(E, edited_type);
|
||||
if (sb->get_class() == leading_stylebox.stylebox->get_class()) {
|
||||
styleboxes.push_back(sb);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user