diff options
Diffstat (limited to 'libnm-glib/nm-wimax-nsp.c')
| -rw-r--r-- | libnm-glib/nm-wimax-nsp.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libnm-glib/nm-wimax-nsp.c b/libnm-glib/nm-wimax-nsp.c index c3b222df..ce1048be 100644 --- a/libnm-glib/nm-wimax-nsp.c +++ b/libnm-glib/nm-wimax-nsp.c @@ -23,6 +23,8 @@ #include <config.h> #include <string.h> +#include "nm-glib-compat.h" + #include <nm-connection.h> #include <nm-setting-connection.h> #include <nm-setting-wimax.h> @@ -37,7 +39,6 @@ G_DEFINE_TYPE (NMWimaxNsp, nm_wimax_nsp, NM_TYPE_OBJECT) #define NM_WIMAX_NSP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_WIMAX_NSP, NMWimaxNspPrivate)) typedef struct { - gboolean disposed; DBusGProxy *proxy; char *name; @@ -217,14 +218,7 @@ dispose (GObject *object) { NMWimaxNspPrivate *priv = NM_WIMAX_NSP_GET_PRIVATE (object); - if (priv->disposed) { - G_OBJECT_CLASS (nm_wimax_nsp_parent_class)->dispose (object); - return; - } - - priv->disposed = TRUE; - - g_object_unref (priv->proxy); + g_clear_object (&priv->proxy); G_OBJECT_CLASS (nm_wimax_nsp_parent_class)->dispose (object); } @@ -247,6 +241,8 @@ get_property (GObject *object, { NMWimaxNsp *nsp = NM_WIMAX_NSP (object); + _nm_object_ensure_inited (NM_OBJECT (object)); + switch (prop_id) { case PROP_NAME: g_value_set_string (value, nm_wimax_nsp_get_name (nsp)); |