mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 07:36:17 +01:00
Guard against a mis-written GOptionArgFunc that has returned FALSE but not
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. svn path=/trunk/; revision=7804
This commit is contained in:
parent
c5e6e11d8e
commit
ed2e6c0814
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
||||
2009-01-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Bug 566573 – g_match_info_fetch_pos docs
|
||||
|
@ -1150,6 +1150,11 @@ parse_arg (GOptionContext *context,
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user