From 67f523883f58d95db99b6a1b32c62b2645838ac9 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 12 Jan 2010 00:55:59 +0100 Subject: [PATCH] audiod: Make writer_cleanup() accept NULL pointer argument. --- audiod.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/audiod.c b/audiod.c index 456813b1..322ce3be 100644 --- a/audiod.c +++ b/audiod.c @@ -340,8 +340,12 @@ static void close_receiver(int slot_num) static void writer_cleanup(struct writer_node *wn) { - struct writer *w = writers + wn->writer_num; + struct writer *w; + if (!wn) + return; + w = writers + wn->writer_num; + PARA_INFO_LOG("closing %s\n", writer_names[wn->writer_num]); w->close(wn); btr_free_node(wn->btrn); } -- 2.39.5