From 4d896a55f4ec62a9df72ce25a66594149a1c0415 Mon Sep 17 00:00:00 2001 From: David Feltell Date: Thu, 28 Aug 2025 17:08:59 +0100 Subject: [PATCH] [Core] Use OpenAssetIO context from manager The Context instance is passed into every API method. The Context may bundle arbitrary state from the manager. In order for the Context to be created with the appropriate state by the manager, the host is required to construct a Context object using the `Manager.createContext()` method. However, we were not doing that and instead constructed the Context directly, which should never be done (other than for trivial cases e.g. unit tests). Signed-off-by: David Feltell --- src/resolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resolver.cpp b/src/resolver.cpp index b0402e5..704b67a 100644 --- a/src/resolver.cpp +++ b/src/resolver.cpp @@ -118,7 +118,7 @@ class UsdOpenAssetIOResolver final : public PXR_NS::ArDefaultResolver { throw std::invalid_argument{manager_->displayName() + " is not capable of resolving entity references"}; } - context_ = openassetio::Context::make(); + context_ = manager_->createContext(); } ~UsdOpenAssetIOResolver() override = default;