You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Fix crash when searching action map creates empty catagories
This commit is contained in:
@@ -126,6 +126,7 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event) {
|
|||||||
while (category) {
|
while (category) {
|
||||||
TreeItem *input_item = category->get_first_child();
|
TreeItem *input_item = category->get_first_child();
|
||||||
|
|
||||||
|
if (input_item != nullptr) {
|
||||||
// has_type this should be always true, unless the tree structure has been misconfigured.
|
// has_type this should be always true, unless the tree structure has been misconfigured.
|
||||||
bool has_type = input_item->get_parent()->has_meta("__type");
|
bool has_type = input_item->get_parent()->has_meta("__type");
|
||||||
int input_type = input_item->get_parent()->get_meta("__type");
|
int input_type = input_item->get_parent()->get_meta("__type");
|
||||||
@@ -150,6 +151,7 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event) {
|
|||||||
input_item = input_item->get_next();
|
input_item = input_item->get_next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
category->set_collapsed(true); // Event not in this category, so collapse;
|
category->set_collapsed(true); // Event not in this category, so collapse;
|
||||||
category = category->get_next();
|
category = category->get_next();
|
||||||
|
|||||||
Reference in New Issue
Block a user