summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-09-25 12:15:30 +0200
committerThomas Haller <thaller@redhat.com>2017-09-26 15:11:58 +0200
commit54490be96d77ac2e34d247b58265dd393f5acba7 (patch)
tree5091a09fd6f0517feafee302874432d236a4ba5e
parent7070d17cedd09d07f12ce977dd1e16cecf8d4b45 (diff)
downloadNetworkManager-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.c5
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 {