VirtualBox

Changeset 31328 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 3, 2010 10:45:28 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64366
Message:

Main: crash fix for r64335 (which broke storage controllers and create machine)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/StorageControllerImpl.cpp

    r31308 r31328  
    7979struct StorageController::Data
    8080{
    81     Data()
     81    Data(Machine * const aMachine)
    8282        : pVirtualBox(NULL),
    8383          pSystemProperties(NULL),
    84           pParent(NULL)
    85     { }
     84          pParent(aMachine)
     85    {
     86        unconst(pVirtualBox) = aMachine->getVirtualBox();
     87        unconst(pSystemProperties) = pVirtualBox->getSystemProperties();
     88    }
    8689
    8790    VirtualBox * const                  pVirtualBox;
     
    136139    AssertReturn(autoInitSpan.isOk(), E_FAIL);
    137140
    138     m = new Data();
    139 
    140     unconst(m->pVirtualBox) = aParent->getVirtualBox();
    141     unconst(m->pSystemProperties) = m->pVirtualBox->getSystemProperties();
    142 
    143     unconst(m->pParent) = aParent;
     141    m = new Data(aParent);
     142
    144143    /* m->pPeer is left null */
    145144
     
    219218    AssertReturn(autoInitSpan.isOk(), E_FAIL);
    220219
    221     m = new Data();
    222 
    223     unconst(m->pParent) = aParent;
     220    m = new Data(aParent);
    224221
    225222    /* register with parent early, since uninit() will unconditionally
     
    228225
    229226    /* sanity */
    230     AutoCaller thatCaller (aThat);
     227    AutoCaller thatCaller(aThat);
    231228    AssertComRCReturnRC(thatCaller.rc());
    232229
     
    267264    AssertReturn(autoInitSpan.isOk(), E_FAIL);
    268265
    269     m = new Data();
    270 
    271     unconst(m->pParent) = aParent;
     266    m = new Data(aParent);
    272267    /* m->pPeer is left null */
    273268
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