VirtualBox

Changeset 70630 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jan 18, 2018 2:01:54 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120354
Message:

Audio/DrvAudio: Check if critical sections are initialized in drvAudioDestruct().

File:
1 edited

Legend:

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

    r70073 r70630  
    33703370    LogFlowFuncEnter();
    33713371
    3372     int rc2 = RTCritSectEnter(&pThis->CritSect);
    3373     AssertRC(rc2);
     3372    int rc2;
     3373
     3374    if (RTCritSectIsInitialized(&pThis->CritSect))
     3375    {
     3376        rc2 = RTCritSectEnter(&pThis->CritSect);
     3377        AssertRC(rc2);
     3378    }
    33743379
    33753380    /*
     
    34273432#endif
    34283433
    3429     rc2 = RTCritSectLeave(&pThis->CritSect);
    3430     AssertRC(rc2);
    3431 
    3432     rc2 = RTCritSectDelete(&pThis->CritSect);
    3433     AssertRC(rc2);
     3434    if (RTCritSectIsInitialized(&pThis->CritSect))
     3435    {
     3436        rc2 = RTCritSectLeave(&pThis->CritSect);
     3437        AssertRC(rc2);
     3438
     3439        rc2 = RTCritSectDelete(&pThis->CritSect);
     3440        AssertRC(rc2);
     3441    }
    34343442
    34353443#ifdef VBOX_WITH_STATISTICS
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