VirtualBox

Changeset 23328 in vbox


Ignore:
Timestamp:
Sep 25, 2009 11:48:22 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52835
Message:

Main: fix assert + crash attaching disk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r23304 r23328  
    21432143                    MediumAttachment *pAttach = *it;
    21442144                    ComObjPtr<Medium> pMedium = pAttach->medium();
    2145                     Assert(!pMedium.isNull());
     2145                    Assert(!pMedium.isNull() || pAttach->type() != DeviceType_HardDisk);
     2146                    if (pMedium.isNull())
     2147                        continue;
    21462148
    21472149                    if (pMedium->base(&level).equalsTo(medium))
     
    22082210                     ++it)
    22092211                {
     2212                    MediumAttachment *pAttach = *it;
     2213                    ComObjPtr<Medium> pMedium = pAttach->medium();
     2214                    Assert(!pMedium.isNull() || pAttach->type() != DeviceType_HardDisk);
     2215                    if (pMedium.isNull())
     2216                        continue;
     2217
    22102218                    uint32_t level = 0;
    2211                     if ((*it)->medium()->base(&level).equalsTo(medium))
     2219                    if (pMedium->base(&level).equalsTo(medium))
    22122220                    {
    22132221                        /* matched device, channel and bus (i.e. attached to the
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