Add missing re-attach nested transaction to parent after a reset in beginTransaction.

This fix the assert failure:
   endTransaction(cling::Transaction*) const: Assertion `T->getState() == Transaction::kCollecting' failed.
This commit is contained in:
Philippe Canal 2013-07-26 15:54:42 -05:00 committed by sftnight
parent 5b2655d120
commit eef395f046

View File

@ -163,7 +163,9 @@ namespace cling {
NewCurT = LastNestedT;
NewCurT->reset();
NewCurT->setCompilationOpts(Opts);
}
// Reset has remove the connection (removeNestedTransaction)
OldCurT->addNestedTransaction(NewCurT); // takes the ownership
}
else {
NewCurT = new Transaction(Opts);
OldCurT->addNestedTransaction(NewCurT); // takes the ownership