aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat-text-view.c4
-rw-r--r--libempathy-gtk/empathy-theme-adium.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index 5ed7c69c3..abe1fc1f3 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -817,6 +817,10 @@ chat_text_view_clear (EmpathyChatView *view)
priv = GET_PRIV (view);
priv->last_timestamp = 0;
+ if (priv->last_contact) {
+ g_object_unref (priv->last_contact);
+ priv->last_contact = NULL;
+ }
}
static gboolean
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 1f1b3b06d..aab1f6f3d 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -564,6 +564,13 @@ theme_adium_clear (EmpathyChatView *view)
priv->data->template_html,
basedir_uri);
g_free (basedir_uri);
+
+ /* Clear last contact to avoid trying to add a 'joined'
+ * message when we don't have an insertion point. */
+ if (priv->last_contact) {
+ g_object_unref (priv->last_contact);
+ priv->last_contact = NULL;
+ }
}
static gboolean