Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3280,10 +3280,12 @@ namespace internal
if (this->m_sharedStatefulIterator)
{
this->m_sharedStatefulIterator->close();
this->m_sharedStatefulIterator.reset();
}
Series impl;
impl.setData({this, [](auto const *) {}});
if (auto IOHandler = impl.IOHandler(); IOHandler &&
auto IOHandler = impl.IOHandler();
if (IOHandler &&
/*
* Scenario: A user calls `Series::flush()` but does not check for
* thrown exceptions. The exception will propagate further up,
Expand Down Expand Up @@ -3317,7 +3319,7 @@ namespace internal
// This releases the openPMD hierarchy
iterations.container().clear();
// Release the IO Handler
if (operator*().m_writable.IOHandler)
if (IOHandler)
{
*operator*().m_writable.IOHandler = std::nullopt;
}
Expand Down
Loading