[telepathy-mission-control/master] Make sure connection is not NULL before using it.

Alberto Mardegan alberto.mardegan at nokia.com
Wed Jul 1 01:16:35 PDT 2009


---
 src/mcd-connection.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 398dc93..777d950 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -2024,9 +2024,9 @@ mcd_connection_cancel_channel_request (McdConnection *connection,
 void
 mcd_connection_close (McdConnection *connection)
 {
-    McdConnectionPrivate *priv = MCD_CONNECTION_PRIV (connection);
+    g_return_if_fail (MCD_IS_CONNECTION (connection));
 
-    priv->abort_reason = TP_CONNECTION_STATUS_REASON_REQUESTED;
+    connection->priv->abort_reason = TP_CONNECTION_STATUS_REASON_REQUESTED;
     _mcd_connection_release_tp_connection (connection);
     mcd_mission_abort (MCD_MISSION (connection));
 }
-- 
1.5.6.5




More information about the telepathy-commits mailing list