VirtualBox

Changeset 76017 in vbox for trunk/src


Ignore:
Timestamp:
Dec 6, 2018 3:05:44 PM (6 years ago)
Author:
vboxsync
Message:

NAT: drvNATDestruct - don't try to stop OS X DNS monitor thread that
hasn't been started. This can happen if slirp refuses to start for
whatever reason, e.g. bad netmask specified in the configuration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r69500 r76017  
    15011501#ifdef RT_OS_DARWIN
    15021502    /* Cleanup the DNS watcher. */
    1503     CFRunLoopRef hRunLoopMain = CFRunLoopGetMain();
    1504     CFRetain(hRunLoopMain);
    1505     CFRunLoopRemoveSource(hRunLoopMain, pThis->hRunLoopSrcDnsWatcher, kCFRunLoopCommonModes);
    1506     CFRelease(hRunLoopMain);
    1507     CFRelease(pThis->hRunLoopSrcDnsWatcher);
    1508     pThis->hRunLoopSrcDnsWatcher = NULL;
     1503    if (pThis->hRunLoopSrcDnsWatcher != NULL)
     1504    {
     1505        CFRunLoopRef hRunLoopMain = CFRunLoopGetMain();
     1506        CFRetain(hRunLoopMain);
     1507        CFRunLoopRemoveSource(hRunLoopMain, pThis->hRunLoopSrcDnsWatcher, kCFRunLoopCommonModes);
     1508        CFRelease(hRunLoopMain);
     1509        CFRelease(pThis->hRunLoopSrcDnsWatcher);
     1510        pThis->hRunLoopSrcDnsWatcher = NULL;
     1511    }
    15091512#endif
    15101513}
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