summaryrefslogtreecommitdiff
path: root/telepathy-logger/log-entry-text.c
diff options
context:
space:
mode:
Diffstat (limited to 'telepathy-logger/log-entry-text.c')
-rw-r--r--telepathy-logger/log-entry-text.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/telepathy-logger/log-entry-text.c b/telepathy-logger/log-entry-text.c
index 1cb249755..82540766d 100644
--- a/telepathy-logger/log-entry-text.c
+++ b/telepathy-logger/log-entry-text.c
@@ -56,8 +56,11 @@ tpl_log_entry_text_dispose (GObject * obj)
TplLogEntryText *self = TPL_LOG_ENTRY_TEXT (obj);
TplLogEntryTextPriv *priv = GET_PRIV (self);
- tpl_object_unref_if_not_null (priv->tpl_text);
- priv->tpl_text = NULL;
+ if (priv->tpl_text != NULL)
+ {
+ g_object_unref (priv->tpl_text);
+ priv->tpl_text = NULL;
+ }
G_OBJECT_CLASS (tpl_log_entry_text_parent_class)->dispose (obj);
}
@@ -294,9 +297,9 @@ tpl_log_entry_text_set_tpl_channel_text (TplLogEntryText * self,
g_return_if_fail (TPL_IS_CHANNEL_TEXT (data) || data == NULL);
priv = GET_PRIV (self);
- tpl_object_unref_if_not_null (priv->tpl_text);
- priv->tpl_text = data;
- tpl_object_ref_if_not_null (data);
+ if (priv->tpl_text != NULL)
+ g_object_unref (priv->tpl_text);
+ priv->tpl_text = g_object_ref (data);
}