diff options
author | Peter Bloomfield <PeterBloomfield@bellsouth.net> | 2021-05-17 11:50:12 -0400 |
---|---|---|
committer | Peter Bloomfield <PeterBloomfield@bellsouth.net> | 2021-05-17 11:50:12 -0400 |
commit | 955307208f3c8a585ce8fc79195c5c9a0b7d843b (patch) | |
tree | 1a1c3096b26f9d35c13fa7b613af58d2a915976b | |
parent | d64d46dc42f07e810b6188561e1f6f62a2392d39 (diff) | |
download | glib-955307208f3c8a585ce8fc79195c5c9a0b7d843b.tar.gz |
gapplication: Guard g_application_mark_busy()
The `GApplication` must be registered before calling
`g_application_mark_busy()`. Document that, and add a guard.
The same is true for `g_application_unmark_busy()`, but the existing
documentation and guard for `busy_count > 0` are enough.
-rw-r--r-- | gio/gapplication.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gio/gapplication.c b/gio/gapplication.c index dfdd90eeb..fbb9d4ebe 100644 --- a/gio/gapplication.c +++ b/gio/gapplication.c @@ -2832,6 +2832,8 @@ g_application_quit (GApplication *application) * * To cancel the busy indication, use g_application_unmark_busy(). * + * The application must be registered before calling this function. + * * Since: 2.38 **/ void @@ -2840,6 +2842,7 @@ g_application_mark_busy (GApplication *application) gboolean was_busy; g_return_if_fail (G_IS_APPLICATION (application)); + g_return_if_fail (application->priv->is_registered); was_busy = (application->priv->busy_count > 0); application->priv->busy_count++; |