summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2011-08-12 13:32:37 +0200
committerRichard Hughes <richard@hughsie.com>2011-08-12 13:32:37 +0200
commit3be719a27e2fea4596dd9e30cfcf0c70f28c20bd (patch)
tree813cd207cac77a1977c1f41a391285fa3ee0ac1f /src
parentcb72d03a68d8ec89fa8e99bc4cdef03a91adf758 (diff)
trivial: The D-Bus connection is unset in the self test program
Diffstat (limited to 'src')
-rw-r--r--src/pk-transaction.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index c4615b0b..b198d809 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -2684,8 +2684,10 @@ pk_transaction_dbus_return (GDBusMethodInvocation *context, GError *error)
{
/* not set inside the test suite */
if (context == NULL) {
- g_warning ("context null, and error: %s", error->message);
- g_error_free (error);
+ if (error != NULL) {
+ g_warning ("context null, and error: %s", error->message);
+ g_error_free (error);
+ }
return;
}
if (error != NULL)
@@ -5829,14 +5831,16 @@ pk_transaction_dispose (GObject *object)
}
/* send signal to clients that we are about to be destroyed */
- g_debug ("emitting destroy %s", transaction->priv->tid);
- g_dbus_connection_emit_signal (transaction->priv->connection,
- NULL,
- transaction->priv->tid,
- PK_DBUS_INTERFACE_TRANSACTION,
- "Destroy",
- NULL,
- NULL);
+ if (transaction->priv->connection != NULL) {
+ g_debug ("emitting destroy %s", transaction->priv->tid);
+ g_dbus_connection_emit_signal (transaction->priv->connection,
+ NULL,
+ transaction->priv->tid,
+ PK_DBUS_INTERFACE_TRANSACTION,
+ "Destroy",
+ NULL,
+ NULL);
+ }
G_OBJECT_CLASS (pk_transaction_parent_class)->dispose (object);
}