VirtualBox

Changeset 38041 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 18, 2011 9:01:18 PM (13 years ago)
Author:
vboxsync
Message:

Main/MachineImpl: fix automatic diff creation when cloning a VM (linked clone and full clone case)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp

    r38038 r38041  
    642642                    if (pLMedium.isNull())
    643643                        throw E_POINTER;
    644                     if (pLMedium->isReadOnly())
     644                    ComObjPtr<Medium> pBase = pLMedium->getBase();
     645                    if (pBase->isReadOnly())
    645646                    {
    646647                        ComObjPtr<Medium> pDiff;
     
    799800            if (mtc.fCreateDiffs)
    800801            {
    801                 if (pNewParent->isReadOnly())
     802                const MEDIUMTASK &mt = mtc.chain.first();
     803                ComPtr<IMedium> pMedium = mt.pMedium;
     804                IMedium *pTmp = pMedium;
     805                ComObjPtr<Medium> pLMedium = static_cast<Medium*>(pTmp);
     806                if (pLMedium.isNull())
     807                    throw E_POINTER;
     808                ComObjPtr<Medium> pBase = pLMedium->getBase();
     809                if (pBase->isReadOnly())
    802810                {
    803811                    ComObjPtr<Medium> pDiff;
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