[glib/glib-2-30] g_variant_unref: add g_return_if_fail() NULL check
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-30] g_variant_unref: add g_return_if_fail() NULL check
- Date: Mon, 3 Oct 2011 15:12:25 +0000 (UTC)
commit 35a9f3a7f29c74c811b32c0907ce29390c7180da
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Oct 3 11:12:01 2011 -0400
g_variant_unref: add g_return_if_fail() NULL check
Patch from Rodney Dawes.
glib/gvariant-core.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glib/gvariant-core.c b/glib/gvariant-core.c
index aa31d48..d37f135 100644
--- a/glib/gvariant-core.c
+++ b/glib/gvariant-core.c
@@ -614,6 +614,8 @@ g_variant_is_trusted (GVariant *value)
void
g_variant_unref (GVariant *value)
{
+ g_return_if_fail (value != NULL);
+
if (g_atomic_int_dec_and_test (&value->ref_count))
{
if G_UNLIKELY (value->state & STATE_LOCKED)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]