VirtualBox

Changeset 6219 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 29, 2007 1:16:31 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27036
Message:

pcnet: don't crash if no driver is attached

File:
1 edited

Legend:

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

    r6120 r6219  
    14331433{
    14341434    PCNetState *pData = PDMINS2DATA(pDevIns, PCNetState *);
    1435     pData->pDrv->pfnNotifyCanReceive(pData->pDrv);
     1435    if (pData->pDrv)
     1436        pData->pDrv->pfnNotifyCanReceive(pData->pDrv);
    14361437    return true;
    14371438}
     
    24842485#else
    24852486                /* check for promiscuous mode change */
    2486                 pData->pDrv->pfnSetPromiscuousMode(pData->pDrv, !!(val & 0x8000));
     2487                if (pData->pDrv)
     2488                    pData->pDrv->pfnSetPromiscuousMode(pData->pDrv, !!(val & 0x8000));
    24872489#endif
    24882490            }
Note: See TracChangeset for help on using the changeset viewer.

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