about summary refs log tree commit diff
path: root/src/main.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2014-04-26 20:55:17 +0200
committerSjoerd Simons <sjoerd@luon.net>2014-04-26 20:55:17 +0200
commit0dccbc804e92f56afd9e7d598dce4bcd8716bbcc (patch)
tree1054a65c0cde38dc89e5c692a3a7458160823afa /src/main.c
parent7df62b86e35a67049a4bc7810c29994d8a7ef175 (diff)
parent59c3714a494c3b3765657c0551ad82842d98a7d2 (diff)
Merge tag 'upstream/0.9.8.10'
Upstream version 0.9.8.10
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index ffa994c1..eb829a7b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -388,11 +388,13 @@ main (int argc, char *argv[])
 	g_option_context_set_summary (opt_ctx,
 		_("NetworkManager monitors all network connections and automatically\nchooses the best connection to use.  It also allows the user to\nspecify wireless access points which wireless cards in the computer\nshould associate with."));
 
-	success = g_option_context_parse (opt_ctx, &argc, &argv, NULL);
+	success = g_option_context_parse (opt_ctx, &argc, &argv, &error);
 	g_option_context_free (opt_ctx);
 
 	if (!success) {
-		fprintf (stderr, _("Invalid option.  Please use --help to see a list of valid options.\n"));
+		fprintf (stderr, _("%s.  Please use --help to see a list of valid options.\n"),
+		         error->message);
+		g_clear_error (&error);
 		exit (1);
 	}