diff --git a/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C b/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C index b5e74a78c0..5165de7e52 100644 --- a/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C +++ b/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,8 +60,13 @@ Foam::TimeDataEntry::TimeDataEntry : time_(tde.time_), name_(tde.name_), - entry_(tde.entry_->clone().ptr()) -{} + entry_() +{ + if (entry_.valid()) + { + entry_.reset(tde.entry_->clone().ptr()); + } +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //