VirtualBox

Ignore:
Timestamp:
Mar 24, 2009 4:44:37 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
44927
Message:

Main: Improve fix for #3727 by handling case when oldimage != image.

File:
1 edited

Legend:

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

    r18194 r18206  
    587587                }
    588588            }
     589
     590            if (!oldData->image.isNull() &&
     591                !oldData->image.equalsTo (m->image))
     592            {
     593                /* Reattach from the old image. */
     594                HRESULT rc = oldData->image->attachTo(mParent->id(), mParent->snapshotId());
     595                AssertComRC (rc);
     596                if (Global::IsOnline (adep.machineState()))
     597                {
     598                    /* Lock from the old image. */
     599                    rc = oldData->image->LockRead (NULL);
     600                    AssertComRC (rc);
     601                }
     602            }
    589603        }
    590604
     
    671685    /* we need adep for the state check */
    672686    Machine::AutoAnyStateDependency adep (mParent);
    673     AssertComRCReturn (adep.rc(), false);
     687    AssertComRCReturn (adep.rc(), E_FAIL);
    674688
    675689    if (!m->image.isNull())
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