]> git.0d.be Git - empathy.git/commitdiff
Fix a warning: don't set the ui sensitive if it's not yet created
authorXavier Claessens <xclaesse@src.gnome.org>
Wed, 2 Apr 2008 09:42:20 +0000 (09:42 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Wed, 2 Apr 2008 09:42:20 +0000 (09:42 +0000)
svn path=/trunk/; revision=854

libempathy-gtk/empathy-chat.c

index e67554ee8f596dd29bc3f5ba1206d5b4171dbafd..0dbc25a41562075fc3a938fa7c83e93c54b9eb6c 100644 (file)
@@ -1616,9 +1616,11 @@ empathy_chat_set_tp_chat (EmpathyChat   *chat,
                          G_CALLBACK (chat_destroy_cb),
                          chat);
 
-       gtk_widget_set_sensitive (chat->input_text_view, TRUE);
-       if (priv->block_events_timeout_id == 0) {
-               empathy_chat_view_append_event (chat->view, _("Connected"));
+       if (chat->input_text_view) {
+               gtk_widget_set_sensitive (chat->input_text_view, TRUE);
+               if (priv->block_events_timeout_id == 0) {
+                       empathy_chat_view_append_event (chat->view, _("Connected"));
+               }
        }
 
        g_object_notify (G_OBJECT (chat), "tp-chat");