aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-chat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index c08b49c3f..d62537110 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1957,9 +1957,16 @@ empathy_chat_paste (EmpathyChat *chat)
{
GtkTextBuffer *buffer;
GtkClipboard *clipboard;
+ EmpathyChatPriv *priv;
g_return_if_fail (EMPATHY_IS_CHAT (chat));
+ priv = GET_PRIV (chat);
+
+ if (priv->tp_chat == NULL ||
+ !GTK_WIDGET_IS_SENSITIVE (chat->input_text_view))
+ return;
+
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view));
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);