VirtualBox

Changeset 24654 in vbox for trunk


Ignore:
Timestamp:
Nov 14, 2009 8:50:23 PM (15 years ago)
Author:
vboxsync
Message:

VirtualBoxBase.h: new may throw std::bad_alloc, so don't assing mBackupData before new has returned successfully.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r23636 r24654  
    22692269        AssertMsg(data, ("data to copy must not be NULL"));
    22702270        if (data)
    2271             attach(new D (*data));
     2271            attach(new D(*data));
    22722272    }
    22732273
     
    23462346        if (this->mData && !mBackupData)
    23472347        {
     2348            D *pNewData = new D(*this->mData)
    23482349            mBackupData = this->mData;
    2349             this->mData = new D(*mBackupData);
     2350            this->mData = pNewData;
    23502351        }
    23512352    }
     
    24172418            if (!mBackupData)
    24182419            {
     2420                D *pNewData = new D(*data)
    24192421                mBackupData = this->mData;
    2420                 this->mData = new D (*data);
     2422                this->mData = pNewData;
    24212423            }
    24222424            else
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