Skip to content

Commit

Permalink
fix: Possible crash when using internal streams from Initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
vasylskorych committed Sep 10, 2024
1 parent 8ae9117 commit 5d2b90d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ModelsAPI/StreamManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,17 @@ void CStreamManager::ClearResults()

void CStreamManager::Clear()
{
// remove all streams and holdups
for (auto* streams : m_allStreams)
streams->clear();
for (auto* holdups : m_allHoldups)
holdups->clear();
// reset number of variable objects
m_nVarHoldups = 0;
m_nVarStreams = 0;
// reset stored time window
m_timeBegStored = 0.0;
m_timeEndStored = 0.0;
}

size_t CStreamManager::GetFeedsNumber() const
Expand Down

0 comments on commit 5d2b90d

Please sign in to comment.