diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h index 2e46cd2db3..2da234e112 100644 --- a/shared/nm-glib-aux/nm-macros-internal.h +++ b/shared/nm-glib-aux/nm-macros-internal.h @@ -1226,6 +1226,14 @@ nm_g_variant_unref (GVariant *v) g_variant_unref (v); } +static inline GVariant * +nm_g_variant_take_ref (GVariant *v) +{ + if (v) + g_variant_take_ref (v); + return v; +} + /*****************************************************************************/ /* Determine whether @x is a power of two (@x being an integer type).