Don't show contact if it's null
[conv-inbox] / src / el-home-applet.c
index 69185e3..7991a94 100644 (file)
@@ -648,6 +648,8 @@ show_contact (ELHomeApplet *self)
 {
         ELHomeAppletPrivate *priv = self->priv;
 
+        g_return_if_fail (priv->contact);
+
         gtk_label_set_text (GTK_LABEL (priv->sender),
                             osso_abook_contact_get_display_name (priv->contact));
         resize_sender (priv);
@@ -1210,11 +1212,13 @@ read_event (ELHomeApplet *self)
         if (priv->event_id >= 0) {
                 gboolean new_account = g_strcmp0 (priv->local_id, local_id);
 
-                if (g_strcmp0 (priv->remote_id, remote_id) || new_account) {
+                if (g_strcmp0 (priv->remote_id, remote_id) ||
+                    new_account ||
+                    !priv->contact) {
                         clean_contact (self);
                         start_aggregator (self);
                 }
-                else {
+                else if (priv->contact) {
                         show_contact (self);
                 }