summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-12-06 16:44:31 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-12-06 16:44:31 +0000
commit73696ef8be895797cd84d86c6f85ea2fdc5a7a3d (patch)
tree0398bf261fc815178d4d1bd8544cace823f2cea6 /gtk/gtkmain.c
parent83344dae857acd2b4d70d1f1677a2e09b400517f (diff)
downloadgtk+-73696ef8be895797cd84d86c6f85ea2fdc5a7a3d.tar.gz
Don't ignore errors from g_option_context_parse().
2005-12-06 Matthias Clasen <mclasen@redhat.com> * gdk/gdk.c (gdk_parse_args): * gtk/gtkmain.c (gtk_parse_args): Don't ignore errors from g_option_context_parse().
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 3f9f54d98d..ecc35906f6 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -673,6 +673,7 @@ gtk_parse_args (int *argc,
{
GOptionContext *option_context;
GOptionGroup *gtk_group;
+ GError *error = NULL;
if (gtk_initialized)
return TRUE;
@@ -687,7 +688,12 @@ gtk_parse_args (int *argc,
g_option_context_set_help_enabled (option_context, FALSE);
gtk_group = gtk_get_option_group (FALSE);
g_option_context_set_main_group (option_context, gtk_group);
- g_option_context_parse (option_context, argc, argv, NULL);
+ if (!g_option_context_parse (option_context, argc, argv, &error))
+ {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
+
g_option_context_free (option_context);
return TRUE;