VirtualBox

Changeset 31817 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 20, 2010 1:04:25 PM (14 years ago)
Author:
vboxsync
Message:

Main: cleanup medium objects from media registry, second try

File:
1 edited

Legend:

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

    r31814 r31817  
    426426            autoInitSpan.setSucceeded();
    427427        else
     428        {
    428429            autoInitSpan.setLimited();
     430
     431            // uninit media from this machine's media registry, or else
     432            // reloading the settings will fail
     433            mParent->unregisterMachineMedia(getId());
     434        }
    429435    }
    430436
     
    503509            autoInitSpan.setSucceeded();
    504510        else
     511        {
    505512            autoInitSpan.setLimited();
     513
     514            // uninit media from this machine's media registry, or else
     515            // reloading the settings will fail
     516            mParent->unregisterMachineMedia(getId());
     517        }
    506518    }
    507519
     
    680692        /* rollback all changes */
    681693        rollback(false /* aNotify */);
     694
     695        // uninit media from this machine's media registry, or else
     696        // reloading the settings will fail
     697        mParent->unregisterMachineMedia(getId());
    682698
    683699        /* uninitialize the common part to make sure all data is reset to
     
    755771    }
    756772
    757     // uninit media from this machine's media registry
     773    // uninit media from this machine's media registry, if they're still there
    758774    mParent->unregisterMachineMedia(getId());
    759775
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