mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
raop: Don't crash if fd is not open when trying to close it
BugLink: http://bugs.launchpad.net/bugs/845286 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
aa3142ab20
commit
f0ad6fd413
1 changed files with 6 additions and 4 deletions
|
|
@ -235,10 +235,12 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
|
|||
}
|
||||
|
||||
case SINK_MESSAGE_RIP_SOCKET: {
|
||||
pa_assert(u->fd >= 0);
|
||||
|
||||
pa_close(u->fd);
|
||||
u->fd = -1;
|
||||
if (u->fd >= 0) {
|
||||
pa_close(u->fd);
|
||||
u->fd = -1;
|
||||
} else
|
||||
/* FIXME */
|
||||
pa_log("We should not get to this state. Cannot rip socket if not connected.");
|
||||
|
||||
if (u->sink->thread_info.state == PA_SINK_SUSPENDED) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue