- Timestamp:
- Jul 7, 2016 2:20:33 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r62014 r62105 8688 8688 if (FAILED(rc)) return rc; 8689 8689 8690 /* Copy the extra data items (Not in any case config is already the same as 8691 * mData->pMachineConfigFile, like when the xml files are read from disk. So 8692 * make sure the extra data map is copied). */ 8693 mData->pMachineConfigFile->mapExtraDataItems = config.mapExtraDataItems; 8690 /* Copy the extra data items (config may or may not be the same as 8691 * mData->pMachineConfigFile) if necessary. When loading the XML files 8692 * from disk they are the same, but not for OVF import. */ 8693 if (mData->pMachineConfigFile != &config) 8694 mData->pMachineConfigFile->mapExtraDataItems = config.mapExtraDataItems; 8694 8695 8695 8696 /* currentStateModified (optional, default is true) */ … … 9953 9954 9954 9955 // now go and copy all the settings data from COM to the settings structures 9955 // (this call es i_saveSettings() on all the COM objects in the machine)9956 // (this calls i_saveSettings() on all the COM objects in the machine) 9956 9957 i_copyMachineDataToSettings(*pNewConfig); 9957 9958 … … 10055 10056 void Machine::i_copyMachineDataToSettings(settings::MachineConfigFile &config) 10056 10057 { 10057 // deep copy extradata 10058 config.mapExtraDataItems = mData->pMachineConfigFile->mapExtraDataItems; 10058 // deep copy extradata, being extra careful with self assignment (the STL 10059 // map assignment on Mac OS X clang based Xcode isn't checking) 10060 if (&config != mData->pMachineConfigFile) 10061 config.mapExtraDataItems = mData->pMachineConfigFile->mapExtraDataItems; 10059 10062 10060 10063 config.uuid = mData->mUuid;
Note:
See TracChangeset
for help on using the changeset viewer.