glib r7803 - in branches/glib-2-18: . glib
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7803 - in branches/glib-2-18: . glib
- Date: Mon, 12 Jan 2009 11:44:28 +0000 (UTC)
Author: tml
Date: Mon Jan 12 11:44:28 2009
New Revision: 7803
URL: http://svn.gnome.org/viewvc/glib?rev=7803&view=rev
Log:
2009-01-12 Tor Lillqvist <tml novell com>
* glib/goption.c (parse_arg): Guard against a mis-written
GOptionArgFunc that has returned FALSE but not set the GError.
Modified:
branches/glib-2-18/ChangeLog
branches/glib-2-18/glib/goption.c
Modified: branches/glib-2-18/glib/goption.c
==============================================================================
--- branches/glib-2-18/glib/goption.c (original)
+++ branches/glib-2-18/glib/goption.c Mon Jan 12 11:44:28 2009
@@ -1149,6 +1149,13 @@
retval = (* (GOptionArgFunc) entry->arg_data) (option_name, data, group->user_data, error);
+ if (!retval && error != NULL && *error == NULL)
+ {
+ g_set_error (error,
+ G_OPTION_ERROR, G_OPTION_ERROR_FAILED,
+ _("Error parsing option %s"), option_name);
+ }
+
g_free (data);
return retval;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]