Skip to content

Commit

Permalink
[cscore] Fix wakeup on sink destruction (wpilibsuite#7245)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJohnson authored Oct 22, 2024
1 parent cbdb4e8 commit 7cc7fa1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cscore/src/main/native/cpp/Instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ void Instance::DestroySource(CS_Source handle) {

void Instance::DestroySink(CS_Sink handle) {
if (auto data = m_sinks.Free(handle)) {
if (auto source = data->sink->GetSource()) {
source->Wakeup();
}
notifier.NotifySink(data->sink->GetName(), handle, CS_SINK_DESTROYED);
}
}

0 comments on commit 7cc7fa1

Please sign in to comment.