Skip to content

Commit

Permalink
Merge pull request #5753 from johnhaddon/anotherShutdownCrash
Browse files Browse the repository at this point in the history
SceneAlgo : Don't destroy adaptor registry at shutdown
  • Loading branch information
johnhaddon authored Mar 28, 2024
2 parents ba55238 + b6e12bd commit cb895ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Fixes
-----

- GafferTest, GafferImageTest : Fixed import of these modules if the `Gaffer` module had not been imported previously.
- SceneAlgo : Fixed potential shutdown crashes caused by the adaptor registry.

1.4.0.0b5 (relative to 1.4.0.0b4)
=========
Expand Down
6 changes: 3 additions & 3 deletions src/GafferScene/SceneAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1331,11 +1331,11 @@ using RenderAdaptors = boost::container::flat_map<string, SceneAlgo::RenderAdapt

RenderAdaptors &renderAdaptors()
{
static RenderAdaptors a;
return a;
static RenderAdaptors *a = new RenderAdaptors;
return *a;
}

}
} // namespace

void GafferScene::SceneAlgo::registerRenderAdaptor( const std::string &name, SceneAlgo::RenderAdaptor adaptor )
{
Expand Down

0 comments on commit cb895ad

Please sign in to comment.