[Telepathy-commits] [telepathy-gabble/master] Prevent crashing if set-location is called too early

Pierre-Luc Beaudoin pierre-luc.beaudoin at collabora.co.uk
Sat Jan 24 20:27:16 PST 2009


---
 src/conn-location.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/conn-location.c b/src/conn-location.c
index 1a0e34a..0dc32e9 100644
--- a/src/conn-location.c
+++ b/src/conn-location.c
@@ -191,6 +191,9 @@ location_set_location (GabbleSvcConnectionInterfaceLocation *iface,
   LmMessage *msg;
   LmMessageNode *geoloc;
 
+  TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED ((TpBaseConnection *) conn,
+    context);
+
   gabble_connection_ensure_capabilities (conn, PRESENCE_CAP_GEOLOCATION);
   msg = pubsub_make_publish_msg (NULL, NS_GEOLOC, NS_GEOLOC, "geoloc",
       &geoloc);
-- 
1.5.6.5




More information about the Telepathy-commits mailing list