From 54490be96d77ac2e34d247b58265dd393f5acba7 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 25 Sep 2017 12:15:30 +0200 Subject: [PATCH] cli: fix crash in interactive mode for "describe ." https://bugzilla.gnome.org/show_bug.cgi?id=788104 --- clients/cli/connections.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ' first, or 'describe .'\n")); + } else if (descr_all) { /* Show description for all properties */ print_setting_description (ss); } else {