Skip to content
Snippets Groups Projects
Commit b811aeaf authored by mattijs's avatar mattijs
Browse files

BUG: autoPtr: cloning empty autoPtr

parent 40697fc1
No related branches found
No related tags found
No related merge requests found
...@@ -52,10 +52,14 @@ inline Foam::autoPtr<T>::autoPtr(const autoPtr<T>& ap, const bool reUse) ...@@ -52,10 +52,14 @@ inline Foam::autoPtr<T>::autoPtr(const autoPtr<T>& ap, const bool reUse)
ptr_ = ap.ptr_; ptr_ = ap.ptr_;
ap.ptr_ = 0; ap.ptr_ = 0;
} }
else else if (ap.valid())
{ {
ptr_ = ap().clone().ptr(); ptr_ = ap().clone().ptr();
} }
else
{
ptr_ = NULL;
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment