VirtualBox

vbox的更動 12143 路徑 trunk/src/VBox/Devices/Storage


忽略:
時間撮記:
2008-9-5 下午03:57:39 (16 年 以前)
作者:
vboxsync
訊息:

disk: ixed a bunch of NULL pointer accesses

位置:
trunk/src/VBox/Devices/Storage
檔案:
修改 4 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Storage/RawHDDCore.cpp

    r11484 r12143  
    396396    {
    397397        pCbProgress = VDGetInterfaceProgress(pIfProgress);
    398         pfnProgress = pCbProgress->pfnProgress;
     398        if (pCbProgress)
     399            pfnProgress = pCbProgress->pfnProgress;
    399400        pvUser = pIfProgress->pvUser;
    400401    }
  • trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp

    r12116 r12143  
    15061506    }
    15071507
    1508     if (RT_SUCCESS(rc) && pCbProgress->pfnProgress)
     1508    if (RT_SUCCESS(rc) && pCbProgress && pCbProgress->pfnProgress)
    15091509        pCbProgress->pfnProgress(NULL /* WARNING! pVM=NULL */, 100,
    15101510                                 pIfProgress->pvUser);
     
    17011701    }
    17021702
    1703     if (RT_SUCCESS(rc) && pCbProgress->pfnProgress)
     1703    if (RT_SUCCESS(rc) && pCbProgress && pCbProgress->pfnProgress)
    17041704        pCbProgress->pfnProgress(NULL /* WARNING! pVM=NULL */, 100,
    17051705                                 pIfProgress->pvUser);
     
    18271827                cbRemaining -= cbThisRead;
    18281828
    1829                 if (pCbProgress->pfnProgress)
     1829                if (pCbProgress && pCbProgress->pfnProgress)
    18301830                {
    18311831                    rc = pCbProgress->pfnProgress(NULL /* WARNING! pVM=NULL */,
     
    18761876                cbRemaining -= cbThisRead;
    18771877
    1878                 if (pCbProgress->pfnProgress)
     1878                if (pCbProgress && pCbProgress->pfnProgress)
    18791879                {
    18801880                    rc = pCbProgress->pfnProgress(NULL /* WARNING! pVM=NULL */,
     
    19441944        RTMemTmpFree(pvBuf);
    19451945
    1946     if (RT_SUCCESS(rc) && pCbProgress->pfnProgress)
     1946    if (RT_SUCCESS(rc) && pCbProgress && pCbProgress->pfnProgress)
    19471947        pCbProgress->pfnProgress(NULL /* WARNING! pVM=NULL */, 100,
    19481948                                 pIfProgress->pvUser);
     
    21482148            cbRemaining -= cbThisRead;
    21492149
    2150             if (pCbProgress->pfnProgress)
     2150            if (pCbProgress && pCbProgress->pfnProgress)
    21512151            {
    21522152                rc = pCbProgress->pfnProgress(NULL /* WARNING! pVM=NULL */,
     
    22132213    if (RT_SUCCESS(rc))
    22142214    {
    2215         if (pCbProgress->pfnProgress)
     2215        if (pCbProgress && pCbProgress->pfnProgress)
    22162216            pCbProgress->pfnProgress(NULL /* WARNING! pVM=NULL */, 100,
    22172217                                     pIfProgress->pvUser);
  • trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp

    r11484 r12143  
    834834    {
    835835        pCbProgress = VDGetInterfaceProgress(pIfProgress);
    836         pfnProgress = pCbProgress->pfnProgress;
     836        if (pCbProgress)
     837            pfnProgress = pCbProgress->pfnProgress;
    837838        pvUser = pIfProgress->pvUser;
    838839    }
  • trunk/src/VBox/Devices/Storage/VHDHDDCore.cpp

    r12116 r12143  
    16001600    {
    16011601        pCbProgress = VDGetInterfaceProgress(pIfProgress);
    1602         pfnProgress = pCbProgress->pfnProgress;
     1602        if (pCbProgress)
     1603            pfnProgress = pCbProgress->pfnProgress;
    16031604        pvUser = pIfProgress->pvUser;
    16041605    }
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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