VirtualBox

Changeset 62054 in vbox


Ignore:
Timestamp:
Jul 6, 2016 12:50:12 PM (8 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio.cpp: Fixed crashing on driver version mismatch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r61887 r62054  
    17061706    if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_INITIALIZED)
    17071707    {
     1708        /* Check if the pointer to  the host audio driver is still valid.
     1709         * It can be NULL if we were called in drvAudioDestruct, for example. */
    17081710        if (pThis->pHostDrvAudio)
    17091711            rc = pThis->pHostDrvAudio->pfnStreamDestroy(pThis->pHostDrvAudio, pHstStream);
     
    19011903    AssertRC(rc2);
    19021904
    1903     PPDMAUDIOSTREAM pStream, pStreamNext;
    1904     RTListForEachSafe(&pThis->lstHstStreams, pStream, pStreamNext, PDMAUDIOSTREAM, Node)
    1905         drvAudioStreamDestroyInternal(pThis, pStream);
    1906 
    1907     RTListForEachSafe(&pThis->lstGstStreams, pStream, pStreamNext, PDMAUDIOSTREAM, Node)
    1908         drvAudioStreamDestroyInternal(pThis, pStream);
    1909 
    19101905    /*
    19111906     * Note: No calls here to the driver below us anymore,
     
    19151910     */
    19161911
    1917     /* Sanity. */
    1918     Assert(RTListIsEmpty(&pThis->lstHstStreams));
    1919     Assert(RTListIsEmpty(&pThis->lstGstStreams));
     1912    /* Thus, NULL the pointer to the host audio driver first,
     1913     * so that routines like drvAudioStreamDestroyInternal() don't call the driver(s) below us anymore. */
     1914    pThis->pHostDrvAudio = NULL;
     1915
     1916    PPDMAUDIOSTREAM pStream, pStreamNext;
     1917    RTListForEachSafe(&pThis->lstHstStreams, pStream, pStreamNext, PDMAUDIOSTREAM, Node)
     1918        drvAudioStreamDestroyInternal(pThis, pStream);
     1919
     1920    RTListForEachSafe(&pThis->lstGstStreams, pStream, pStreamNext, PDMAUDIOSTREAM, Node)
     1921        drvAudioStreamDestroyInternal(pThis, pStream);
    19201922
    19211923#ifdef VBOX_WITH_AUDIO_CALLBACKS
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette