summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-07-13 14:49:25 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-07-14 12:14:12 +0100
commit91bfd7438e4f14ee8f7859d58e38b2be5a6c9d45 (patch)
tree6d443412b949c132da3a19b44b01c1b736299cda /tests
parentbc8c40454043b536867fb763148897f309ea8076 (diff)
teardown_test: check if porters have already been unreffed
Diffstat (limited to 'tests')
-rw-r--r--tests/wocky-test-helper.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/wocky-test-helper.c b/tests/wocky-test-helper.c
index c880ff0..dd75dd3 100644
--- a/tests/wocky-test-helper.c
+++ b/tests/wocky-test-helper.c
@@ -42,8 +42,10 @@ teardown_test (test_data_t *data)
g_object_unref (data->stream);
g_object_unref (data->in);
g_object_unref (data->out);
- g_object_unref (data->sched_in);
- g_object_unref (data->sched_out);
+ if (data->sched_in != NULL)
+ g_object_unref (data->sched_in);
+ if (data->sched_out != NULL)
+ g_object_unref (data->sched_out);
g_object_unref (data->cancellable);
/* All the stanzas should have been received */