diff --git a/plugins/gtkgui/tabbed_chat_window.py b/plugins/gtkgui/tabbed_chat_window.py
index 4cc4d5a4c0bd33715a30fc30322494d0a5edad2b..712d3663e7414e960b36b2d70ba9b438e4df85e8 100644
--- a/plugins/gtkgui/tabbed_chat_window.py
+++ b/plugins/gtkgui/tabbed_chat_window.py
@@ -151,6 +151,9 @@ class tabbed_chat_window(Chat):
 		if event.keyval == gtk.keysyms.Return:
 			if (event.state & gtk.gdk.SHIFT_MASK):
 				return 0
+			if self.plugin.connected[self.account] < 2: #we are not connected
+				Error_dialog(_('You are not connected, so you cannot send a message'))
+				return 1
 			message_buffer = widget.get_buffer()
 			start_iter = message_buffer.get_start_iter()
 			end_iter = message_buffer.get_end_iter()