Skip to content
Snippets Groups Projects
Commit 88cf93c4 authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

BUG: missing guard for empty list (see b2bc1d654699)

parent 391afe78
Branches
Tags
No related merge requests found
......@@ -655,7 +655,11 @@ bool Foam::Time::writeObject
// Does the writeTime trigger purging?
if (writeTime_ && purgeWrite_)
{
if (previousWriteTimes_.top() != timeName())
if
(
previousWriteTimes_.empty()
|| previousWriteTimes_.top() != timeName()
)
{
previousWriteTimes_.push(timeName());
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment