VirtualBox

Changeset 69399 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Oct 26, 2017 7:02:38 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118726
Message:

Main/Medium: Fix an oversight introduced when using the ready made callback, which can't deal (and it makes no sense to do add it, if there's no progress object to call, why register any interface for getting progress callbacks?)

File:
1 edited

Legend:

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

    r69398 r69399  
    242242        /* Set up a per-operation progress interface, can be used freely (for
    243243         * binary operations you can use it either on the source or target). */
    244         mVDIfProgress.pfnProgress = aProgress->i_vdProgressCallback;
    245         int vrc = VDInterfaceAdd(&mVDIfProgress.Core,
    246                                  "Medium::Task::vdInterfaceProgress",
    247                                  VDINTERFACETYPE_PROGRESS,
    248                                  mProgress,
    249                                  sizeof(mVDIfProgress),
    250                                  &mVDOperationIfaces);
    251         AssertRC(vrc);
    252         if (RT_FAILURE(vrc))
    253             mRC = E_FAIL;
     244        if (mProgress)
     245        {
     246            mVDIfProgress.pfnProgress = aProgress->i_vdProgressCallback;
     247            int vrc = VDInterfaceAdd(&mVDIfProgress.Core,
     248                                     "Medium::Task::vdInterfaceProgress",
     249                                     VDINTERFACETYPE_PROGRESS,
     250                                     mProgress,
     251                                     sizeof(mVDIfProgress),
     252                                     &mVDOperationIfaces);
     253            AssertRC(vrc);
     254            if (RT_FAILURE(vrc))
     255                mRC = E_FAIL;
     256        }
    254257    }
    255258
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette