Changeset 3033 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Jun 4, 2007 3:40:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/VirtualBoxBase.h
r2981 r3033 456 456 * Increases the number of callers of the given object 457 457 * by calling VirtualBoxBase::addCaller(). 458 * 459 * @param aObj Object to add a caller to. If NULL, this 460 * instance is effectively turned to no-op (where 461 * rc() will return S_OK and state() will be 462 * NotReady). 458 463 */ 459 AutoCallerBase (VirtualBoxBaseNEXT_base *aObj) : mObj (aObj) 464 AutoCallerBase (VirtualBoxBaseNEXT_base *aObj) 465 : mObj (aObj) 466 , mRC (S_OK) 467 , mState (NotReady) 460 468 { 461 Assert (aObj);462 mRC =mObj->addCaller (&mState, aLimited);469 if (mObj) 470 mRC = mObj->addCaller (&mState, aLimited); 463 471 } 464 472 … … 470 478 ~AutoCallerBase() 471 479 { 472 if ( SUCCEEDED (mRC))480 if (mObj && SUCCEEDED (mRC)) 473 481 mObj->releaseCaller(); 474 482 } … … 503 511 if (SUCCEEDED (mRC)) 504 512 { 505 mObj->releaseCaller(); 513 if (mObj) 514 mObj->releaseCaller(); 506 515 mRC = E_FAIL; 507 516 } … … 515 524 { 516 525 Assert (!SUCCEEDED (mRC)); 517 if ( !SUCCEEDED (mRC))526 if (mObj && !SUCCEEDED (mRC)) 518 527 mRC = mObj->addCaller (&mState, aLimited); 519 528 }
Note:
See TracChangeset
for help on using the changeset viewer.