Commit 88cf93c4 authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

BUG: missing guard for empty list (see b2bc1d65)

parent 391afe78
...@@ -655,7 +655,11 @@ bool Foam::Time::writeObject ...@@ -655,7 +655,11 @@ bool Foam::Time::writeObject
// Does the writeTime trigger purging? // Does the writeTime trigger purging?
if (writeTime_ && purgeWrite_) if (writeTime_ && purgeWrite_)
{ {
if (previousWriteTimes_.top() != timeName()) if
(
previousWriteTimes_.empty()
|| previousWriteTimes_.top() != timeName()
)
{ {
previousWriteTimes_.push(timeName()); previousWriteTimes_.push(timeName());
} }
......
Supports Markdown
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