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
This commit is contained in:
Lennart Poettering 2006-07-29 17:20:08 +00:00
parent a7cf5e0f2d
commit 646deeaee6

View file

@ -76,6 +76,8 @@ static void operation_set_state(pa_operation *o, pa_operation_state_t st) {
if (st == o->state) if (st == o->state)
return; return;
pa_operation_ref(o);
o->state = st; o->state = st;
if ((o->state == PA_OPERATION_DONE) || (o->state == PA_OPERATION_CANCELED)) { 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->callback = NULL;
o->userdata = NULL; o->userdata = NULL;
} }
pa_operation_unref(o);
} }
void pa_operation_cancel(pa_operation *o) { void pa_operation_cancel(pa_operation *o) {