projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Warn if there already is a main group. (#170445, Jeff Franks)
[platform/upstream/glib.git]
/
glib
/
goption.c
diff --git
a/glib/goption.c
b/glib/goption.c
index
13104f9
..
a8528de
100644
(file)
--- a/
glib/goption.c
+++ b/
glib/goption.c
@@
-312,6
+312,13
@@
g_option_context_set_main_group (GOptionContext *context,
g_return_if_fail (context != NULL);
g_return_if_fail (group != NULL);
+ if (context->main_group)
+ {
+ g_warning ("This GOptionContext already has a main group");
+
+ return;
+ }
+
context->main_group = group;
}