mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: registerCopy may fail for copy construct of regIOobject
- checkIn() was incorrectly conditional on the register state of the source object. Partial patch from .org commit 6dc48b62d948
This commit is contained in:
@ -96,9 +96,12 @@ Foam::regIOobject::regIOobject(const regIOobject& rio, bool registerCopy)
|
||||
eventNo_(db().getEvent()),
|
||||
isPtr_(nullptr)
|
||||
{
|
||||
if (registerCopy && rio.registered_)
|
||||
if (registerCopy)
|
||||
{
|
||||
if (rio.registered_)
|
||||
{
|
||||
const_cast<regIOobject&>(rio).checkOut();
|
||||
}
|
||||
checkIn();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user