[next] telepathy-glib: channel-manager:request: make sure self-> context isn't NULL
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Wed Jan 29 03:02:21 PST 2014
Module: telepathy-glib
Branch: next
Commit: 4167deb795cc63dfc06603e233e0aea66f564d98
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=4167deb795cc63dfc06603e233e0aea66f564d98
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Tue Jan 28 14:49:51 2014 +0100
channel-manager:request: make sure self->context isn't NULL
---
telepathy-glib/channel-manager-request.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/telepathy-glib/channel-manager-request.c b/telepathy-glib/channel-manager-request.c
index 652f1fa..bf09df2 100644
--- a/telepathy-glib/channel-manager-request.c
+++ b/telepathy-glib/channel-manager-request.c
@@ -129,6 +129,8 @@ _tp_channel_manager_request_cancel (TpChannelManagerRequest *self)
GError error = { TP_ERROR, TP_ERROR_DISCONNECTED,
"unable to service this channel request, we're disconnecting!" };
+ g_return_if_fail (self->context != NULL);
+
DEBUG ("cancelling request at %p for %s/%u/%u", self,
self->channel_type, self->handle_type, self->handle);
@@ -144,6 +146,7 @@ _tp_channel_manager_request_satisfy (TpChannelManagerRequest *self,
GHashTable *properties;
g_return_if_fail (TP_IS_EXPORTABLE_CHANNEL (channel));
+ g_return_if_fail (self->context != NULL);
DEBUG ("completing queued request %p with success, "
"channel_type=%s, handle_type=%u, "
@@ -180,6 +183,8 @@ void
_tp_channel_manager_request_fail (TpChannelManagerRequest *self,
GError *error)
{
+ g_return_if_fail (self->context != NULL);
+
DEBUG ("completing queued request %p with error, channel_type=%s, "
"handle_type=%u, handle=%u",
self, self->channel_type, self->handle_type, self->handle);
More information about the telepathy-commits
mailing list