summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Dasmohapatra <vivek@collabora.co.uk>2011-09-01 16:05:32 +0100
committerVivek Dasmohapatra <vivek@collabora.co.uk>2011-09-06 15:13:24 +0100
commitfcaeb1ff9cade6b7451304076d383a01e3559f09 (patch)
treed7dccb2500e050a29687cd7648e14ac115292ffd
parent1e6d4cd9d48c5896f79dbea3bdf6ee64fcef1ad9 (diff)
downloadtelepathy-mission-control-fcaeb1ff9cade6b7451304076d383a01e3559f09.tar.gz
Approval contexts must be NULLed out or the free function will assert()
-rw-r--r--src/mcd-dispatch-operation.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index b49561b1..41d8203c 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -861,6 +861,7 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation,
* it's OK to not distinguish */
tp_svc_channel_dispatch_operation_return_from_handle_with (
approval->context);
+ approval->context = NULL;
}
else
{
@@ -869,6 +870,7 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation,
successful_handler);
dbus_g_method_return_error (approval->context,
priv->result);
+ approval->context = NULL;
}
}
else
@@ -880,12 +882,15 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation,
g_quark_to_string (priv->result->domain),
priv->result->code, priv->result->message);
dbus_g_method_return_error (approval->context, priv->result);
+ approval->context = NULL;
}
break;
default:
- {} /* do nothing */
+ { /* there shouldn't be a dbus context for these: */
+ g_assert (approval->context == NULL);
+ }
}
approval_free (approval);