diff options
author | Thomas Haller <thaller@redhat.com> | 2017-09-25 12:15:30 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-09-26 15:11:58 +0200 |
commit | 54490be96d77ac2e34d247b58265dd393f5acba7 (patch) | |
tree | 5091a09fd6f0517feafee302874432d236a4ba5e | |
parent | 7070d17cedd09d07f12ce977dd1e16cecf8d4b45 (diff) | |
download | NetworkManager-54490be96d77ac2e34d247b58265dd393f5acba7.tar.gz |
cli: fix crash in interactive mode for "describe ."
https://bugzilla.gnome.org/show_bug.cgi?id=788104
-rw-r--r-- | clients/cli/connections.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 7f69dddf92..2c4ee9e237 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -7268,7 +7268,10 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t } else ss = menu_ctx.curr_setting; - if (descr_all) { + if (!ss) { + g_print (_("Error: no setting selected; valid are [%s]\n"), valid_settings_str); + g_print (_("use 'goto <setting>' first, or 'describe <setting>.<property>'\n")); + } else if (descr_all) { /* Show description for all properties */ print_setting_description (ss); } else { |