mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
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:
parent
a7cf5e0f2d
commit
646deeaee6
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue