- Timestamp:
- Nov 2, 2009 8:25:02 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r24273 r24277 9616 9616 MultiResult rc(S_OK); 9617 9617 9618 Snapshot *pOldFirstSnap = mData->mFirstSnapshot;9619 Snapshot *pOldCurrentSnap = mData->mCurrentSnapshot;9618 ComObjPtr<Snapshot> pOldFirstSnap = mData->mFirstSnapshot; 9619 ComObjPtr<Snapshot> pOldCurrentSnap = mData->mCurrentSnapshot; 9620 9620 9621 9621 bool fOnline = Global::IsOnline(mSnapshotData.mLastState); … … 10119 10119 10120 10120 if (RT_SUCCESS(vrc)) 10121 {10122 10121 mSSData->mStateFilePath = stateFilePath; 10123 10124 /* make the snapshot we restored from the current snapshot */10125 mData->mCurrentSnapshot = aTask.m_pSnapshot;10126 }10127 10122 else 10128 10123 throw setError(E_FAIL, … … 10132 10127 vrc); 10133 10128 } 10129 10130 LogFlowThisFunc(("Setting new current snapshot {%RTuuid}\n", aTask.m_pSnapshot->getId().raw())); 10131 /* make the snapshot we restored from the current snapshot */ 10132 mData->mCurrentSnapshot = aTask.m_pSnapshot; 10134 10133 } 10135 10134 … … 10206 10205 } 10207 10206 10208 /* save all settings, reset the modified flag and commit */ 10207 // save all settings, reset the modified flag and commit; 10208 // from here on we cannot roll back on failure any more 10209 10209 rc = saveSettings(SaveS_ResetCurStateModified | saveFlags); 10210 10210 … … 10217 10217 10218 10218 HRESULT rc2 = pMedium->deleteStorageAndWait(); 10219 // ignore errors here because we cannot roll back after saveSettings() above 10219 10220 if (SUCCEEDED(rc2)) 10220 10221 pMedium->uninit(); … … 10231 10232 ErrorInfoKeeper eik; 10232 10233 10233 /* undo all changes on failure unless the subtask has done so*/10234 /* undo all changes on failure */ 10234 10235 rollback(false /* aNotify */); 10235 10236
Note:
See TracChangeset
for help on using the changeset viewer.