Index: /trunk/src/VBox/Devices/Audio/DevSB16.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevSB16.cpp	(revision 71743)
+++ /trunk/src/VBox/Devices/Audio/DevSB16.cpp	(revision 71744)
@@ -2495,4 +2495,16 @@
 
     /*
+     * Initialize the data so sb16Destruct runs without a hitch if we return early.
+     */
+    pThis->pDevInsR3               = pDevIns;
+    pThis->IBase.pfnQueryInterface = sb16QueryInterface;
+    pThis->cmd                     = -1;
+
+    pThis->csp_regs[5]             = 1;
+    pThis->csp_regs[9]             = 0xf8;
+
+    RTListInit(&pThis->lstDrv);
+
+    /*
      * Validations.
      */
@@ -2542,4 +2554,6 @@
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("SB16 configuration error: Failed to get the \"Version\" value"));
+    pThis->ver     = u16Version;
+    pThis->verCfg  = u16Version;
 
 #ifndef VBOX_WITH_AUDIO_SB16_CALLBACKS
@@ -2551,22 +2565,10 @@
 #endif
 
-    pThis->ver     = u16Version;
-    pThis->verCfg  = u16Version;
-
     /*
-     * Init instance data.
+     * Setup the mixer now that we've got the irq and dma channel numbers.
      */
-    pThis->pDevInsR3               = pDevIns;
-    pThis->IBase.pfnQueryInterface = sb16QueryInterface;
-    pThis->cmd                     = -1;
-
-    pThis->mixer_regs[0x80]        = magic_of_irq (pThis->irq);
-    pThis->mixer_regs[0x81]        = (1 << pThis->dma) | (1 << pThis->hdma);
-    pThis->mixer_regs[0x82]        = 2 << 5;
-
-    pThis->csp_regs[5]             = 1;
-    pThis->csp_regs[9]             = 0xf8;
-
-    RTListInit(&pThis->lstDrv);
+    pThis->mixer_regs[0x80] = magic_of_irq(pThis->irq);
+    pThis->mixer_regs[0x81] = (1 << pThis->dma) | (1 << pThis->hdma);
+    pThis->mixer_regs[0x82] = 2 << 5;
 
     sb16MixerReset(pThis);
