Skip to content

Commit

Permalink
fix: Fix Frame Processor SIGSEV crash in `VisionCameraScheduler::trig…
Browse files Browse the repository at this point in the history
…ger` by locking mutex in `dispatchAsync` (#2591)

Add missing lock.
  • Loading branch information
bglgwyng committed Feb 19, 2024
1 parent 7ac6f4d commit 55992bb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ TSelf JVisionCameraScheduler::initHybrid(jni::alias_ref<jhybridobject> jThis) {
}

void JVisionCameraScheduler::dispatchAsync(const std::function<void()>& job) {
std::unique_lock<std::mutex> lock(_mutex);
// 1. add job to queue
_jobs.push(job);
scheduleTrigger();
Expand Down

0 comments on commit 55992bb

Please sign in to comment.