Skip to content

Commit

Permalink
Fix an issue with jobarena direct access
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Nov 20, 2023
1 parent 7917214 commit 3bf4b82
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/osgEarth/Threading
Original file line number Diff line number Diff line change
Expand Up @@ -1089,14 +1089,15 @@ namespace osgEarth { namespace Threading
promise.resolve(function(&promise));
return good;
};
JobArena* arena = JobArena::get(_arenaName);
arena->dispatch(*this, delegate);
auto name = _arena ? _arena->_name : _arenaName;
JobArena::get(name)->dispatch(*this, delegate);
return std::move(future);
}

void Job::dispatch(std::function<void(Cancelable*)> function) const
{
JobArena* arena = JobArena::get(_arenaName);
auto name = _arena ? _arena->_name : _arenaName;
JobArena* arena = JobArena::get(name);
if (arena)
{
JobArena::Delegate delegate = [function]()
Expand Down

0 comments on commit 3bf4b82

Please sign in to comment.