Index: /trunk/src/VBox/Devices/Audio/AudioMixer.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 58572)
+++ /trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 58573)
@@ -349,17 +349,7 @@
         return;
 
-    PAUDMIXSTREAM pStream = RTListGetFirst(&pSink->lstStreams, AUDMIXSTREAM, Node);
-    while (pStream)
-    {
-        PAUDMIXSTREAM pNext = RTListNodeGetNext(&pStream->Node, AUDMIXSTREAM, Node);
-        bool fLast = RTListNodeIsLast(&pSink->lstStreams, &pStream->Node);
-
+    PAUDMIXSTREAM pStream, pStreamNext;
+    RTListForEachSafe(&pSink->lstStreams, pStream, pStreamNext, AUDMIXSTREAM, Node)
         AudioMixerRemoveStream(pSink, pStream);
-
-        if (fLast)
-            break;
-
-        pStream = pNext;
-    }
 
     Assert(pSink->cStreams == 0);
@@ -385,9 +375,11 @@
     pSink->cStreams--;
 
+#ifdef DEBUG
     const char *pszStream = pSink->enmDir == AUDMIXSINKDIR_INPUT
                           ? pStream->pIn->MixBuf.pszName : pStream->pOut->MixBuf.pszName;
 
     LogFlowFunc(("%s: pStream=%s, cStreams=%RU8\n",
-                 pSink->pszName, pszStream, pSink->cStreams));
+                 pSink->pszName, pszStream ? pszStream : "<Unnamed>", pSink->cStreams));
+#endif
 
     audioMixerDestroyStream(pStream);
