mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Add return-if-fail checks to g_application_hold/release
This is our common practice for public API. https://bugzilla.gnome.org/show_bug.cgi?id=685208
This commit is contained in:
parent
1a20d56a89
commit
e16f82854a
@ -1347,6 +1347,8 @@ g_application_register (GApplication *application,
|
||||
void
|
||||
g_application_hold (GApplication *application)
|
||||
{
|
||||
g_return_if_fail (G_IS_APPLICATION (application));
|
||||
|
||||
if (application->priv->inactivity_timeout_id)
|
||||
{
|
||||
g_source_remove (application->priv->inactivity_timeout_id);
|
||||
@ -1381,6 +1383,8 @@ inactivity_timeout_expired (gpointer data)
|
||||
void
|
||||
g_application_release (GApplication *application)
|
||||
{
|
||||
g_return_if_fail (G_IS_APPLICATION (application));
|
||||
|
||||
application->priv->use_count--;
|
||||
|
||||
if (application->priv->use_count == 0 && application->priv->inactivity_timeout)
|
||||
|
Loading…
Reference in New Issue
Block a user