mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
regIOobject: Avoid segmentation fault when destroying objectRegistry with debug on
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -147,14 +147,21 @@ Foam::regIOobject::~regIOobject()
|
|||||||
{
|
{
|
||||||
if (objectRegistry::debug)
|
if (objectRegistry::debug)
|
||||||
{
|
{
|
||||||
Pout<< "Destroying regIOobject called " << name()
|
if (this == &db())
|
||||||
<< " of type " << type()
|
{
|
||||||
|
Pout<< "Destroying objectRegistry " << name()
|
||||||
|
<< " in directory " << rootPath()/caseName()/instance()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Pout<< "Destroying regIOobject " << name()
|
||||||
<< " in directory " << path()
|
<< " in directory " << path()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check out of objectRegistry if not owned by the registry
|
// Check out of objectRegistry if not owned by the registry
|
||||||
|
|
||||||
if (!ownedByRegistry_)
|
if (!ownedByRegistry_)
|
||||||
{
|
{
|
||||||
checkOut();
|
checkOut();
|
||||||
|
|||||||
Reference in New Issue
Block a user