[glib/glib-2-38] GApplication: Don't decrease use_count below 0
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-38] GApplication: Don't decrease use_count below 0
- Date: Fri, 4 Apr 2014 14:19:58 +0000 (UTC)
commit 7adb090d9927d3847751bc1f9ce8df9e0922b4d7
Author: Marek Kasik <mkasik redhat com>
Date: Thu Apr 3 17:35:22 2014 +0200
GApplication: Don't decrease use_count below 0
Place an assert for use_count to be at least 1
in g_application_release() so we don't decrease
it below 0.
https://bugzilla.gnome.org/show_bug.cgi?id=727551
gio/gapplication.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index f5d0678..187423d 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -1370,6 +1370,7 @@ void
g_application_release (GApplication *application)
{
g_return_if_fail (G_IS_APPLICATION (application));
+ g_return_if_fail (application->priv->use_count > 0);
application->priv->use_count--;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]