mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 11:50:14 +01:00
cli: fix assertion in tab completion for gen_property_names()
$ nmcli connection edit type ethernet nmcli> describe x.y<TAB> (process:29799): libnmc-CRITICAL **: nm_meta_setting_info_editor_find_by_name: assertion 'setting_name' failed
This commit is contained in:
parent
5fad8aeb51
commit
c4ef6f2d2f
1 changed files with 7 additions and 3 deletions
|
|
@ -5201,9 +5201,13 @@ gen_property_names (const char *text, int state)
|
|||
valid_settings_main,
|
||||
valid_settings_slave,
|
||||
NULL);
|
||||
setting = nm_meta_setting_info_editor_new_setting (nm_meta_setting_info_editor_find_by_name (setting_name, FALSE),
|
||||
NM_META_ACCESSOR_SETTING_INIT_TYPE_DEFAULT);
|
||||
} else {
|
||||
if (setting_name) {
|
||||
setting = nm_meta_setting_info_editor_new_setting (nm_meta_setting_info_editor_find_by_name (setting_name, FALSE),
|
||||
NM_META_ACCESSOR_SETTING_INIT_TYPE_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
if (!setting) {
|
||||
/* Else take the current setting, if any */
|
||||
setting = nmc_tab_completion.setting ? g_object_ref (nmc_tab_completion.setting) : NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue