Changeset 78202 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 18, 2019 9:51:02 AM (6 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r78124 r78202 9911 9911 E_FAIL); 9912 9912 9913 if (!mData->mAccessible) 9914 return setError(VBOX_E_INVALID_VM_STATE, 9915 tr("The machine is not accessible, so cannot save settings")); 9916 9913 9917 HRESULT rc = S_OK; 9914 9918 bool fNeedsWrite = false; -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r78124 r78202 778 778 779 779 rc = i_registerMedium(pHardDisk, &pHardDisk, treeLock); 780 // Avoid trouble with lock/refcount, before returning or not. 781 treeLock.release(); 782 pHardDisk.setNull(); 783 treeLock.acquire(); 780 784 if (FAILED(rc)) return rc; 781 785 } … … 799 803 800 804 rc = i_registerMedium(pImage, &pImage, treeLock); 805 // Avoid trouble with lock/refcount, before returning or not. 806 treeLock.release(); 807 pImage.setNull(); 808 treeLock.acquire(); 801 809 if (FAILED(rc)) return rc; 802 810 } … … 820 828 821 829 rc = i_registerMedium(pImage, &pImage, treeLock); 830 // Avoid trouble with lock/refcount, before returning or not. 831 treeLock.release(); 832 pImage.setNull(); 833 treeLock.acquire(); 822 834 if (FAILED(rc)) return rc; 823 835 } … … 4932 4944 { 4933 4945 AutoCaller machineCaller(pMachine); 4934 if (SUCCEEDED(machineCaller.rc()) )4946 if (SUCCEEDED(machineCaller.rc()) && pMachine->i_isAccessible()) 4935 4947 ASMAtomicIncU64(&pMachine->uRegistryNeedsSaving); 4936 4948 }
Note:
See TracChangeset
for help on using the changeset viewer.