VirtualBox

Changeset 71995 in vbox for trunk/src


Ignore:
Timestamp:
Apr 24, 2018 7:44:43 AM (7 years ago)
Author:
vboxsync
Message:

bugref:8345. Call WaitForAsyncProgressCompletion only in success.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp

    r71993 r71995  
    10891089            ComPtr<IProgress> moveDiskProgress;
    10901090            rc = pMedium->SetLocation(bstrLocation.raw(), moveDiskProgress.asOutParam());
    1091             /* Wait until the async process has finished. */
    1092             rc = m_pProgress->WaitForAsyncProgressCompletion(moveDiskProgress);
     1091            if (SUCCEEDED(rc))
     1092            {
     1093                /* In case of failure moveDiskProgress would be in the invalid state or not initialized at all
     1094                 * Call WaitForAsyncProgressCompletion only in success
     1095                 */
     1096                /* Wait until the async process has finished. */
     1097                rc = m_pProgress->WaitForAsyncProgressCompletion(moveDiskProgress);
     1098            }
    10931099
    10941100            /*acquire the lock back*/
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