aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 1496f582d..be5d71ec7 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1604,15 +1604,19 @@ chat_subject_changed_cb (EmpathyChat *chat)
gtk_widget_show (priv->hbox_topic);
}
if (priv->block_events_timeout_id == 0) {
- gchar *str;
+ gchar *str = NULL;
if (!EMP_STR_EMPTY (priv->subject)) {
str = g_strdup_printf (_("Topic set to: %s"), priv->subject);
- } else {
+ } else if (empathy_tp_chat_supports_subject (priv->tp_chat)) {
+ /* No need to display this 'event' is no topic can be defined anyway */
str = g_strdup (_("No topic defined"));
}
- empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
- g_free (str);
+
+ if (str != NULL) {
+ empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
+ g_free (str);
+ }
}
}