loudmouth/lm-connection.c
changeset 168 ac1affcd5d22
parent 156 8c054d9e98b8
child 178 260d6853b457
--- a/loudmouth/lm-connection.c	Tue Aug 22 23:33:06 2006 +0000
+++ b/loudmouth/lm-connection.c	Fri Sep 01 14:01:48 2006 +0000
@@ -1514,7 +1514,9 @@
 	connection = lm_connection_new (server);
 	connection->context = context;
 
-        g_main_context_ref (connection->context);
+	if (context) {
+        	g_main_context_ref (connection->context);
+	}
 
 	return connection;
 }
@@ -2323,6 +2325,7 @@
 			GError       **error)
 {
 	g_return_val_if_fail (connection != NULL, FALSE);
+	g_return_val_if_fail (str != NULL, FALSE);
 
 	return connection_send (connection, str, -1, error);
 }