summaryrefslogtreecommitdiffstats
path: root/src/pulse
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-07-29 17:20:08 +0000
committerLennart Poettering <lennart@poettering.net>2006-07-29 17:20:08 +0000
commit646deeaee69b2a3e5b3dedbf6bf4cccdd9255957 (patch)
tree78ea957b704d13d0d68b4b5c8e152c16e132a002 /src/pulse
parenta7cf5e0f2de5474b4a1131a4254a56229436b7f7 (diff)
don't hit an assetr if there are operations outstanding when the pa_context is destroyed
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1171 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulse')
-rw-r--r--src/pulse/operation.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pulse/operation.c b/src/pulse/operation.c
index 24ddf69f..8d896d7d 100644
--- a/src/pulse/operation.c
+++ b/src/pulse/operation.c
@@ -76,6 +76,8 @@ static void operation_set_state(pa_operation *o, pa_operation_state_t st) {
if (st == o->state)
return;
+ pa_operation_ref(o);
+
o->state = st;
if ((o->state == PA_OPERATION_DONE) || (o->state == PA_OPERATION_CANCELED)) {
@@ -92,6 +94,8 @@ static void operation_set_state(pa_operation *o, pa_operation_state_t st) {
o->callback = NULL;
o->userdata = NULL;
}
+
+ pa_operation_unref(o);
}
void pa_operation_cancel(pa_operation *o) {