From 604101f933555f08d75d54cbb1fe016eff1b02e5 Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Tue, 18 Nov 2014 18:39:58 +0000
Subject: winepulse: fix segfault in pulse_rd_loop

---
 dlls/winepulse.drv/mmdevdrv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
index 5c00a88..c6f4830 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -790,6 +790,7 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
         size_t src_len, copy, rem = This->capture_period;
         if (!(p = (ACPacket*)list_head(&This->packet_free_head))) {
             p = (ACPacket*)list_head(&This->packet_filled_head);
+            if (!p) return;
             if (!p->discont) {
                 next = (ACPacket*)p->entry.next;
                 next->discont = 1;
-- 
2.6.2

