Skip to content

Commit 4d896a5

Browse files
committed
[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 <david.feltell@foundry.com>
1 parent 612b50e commit 4d896a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/resolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class UsdOpenAssetIOResolver final : public PXR_NS::ArDefaultResolver {
118118
throw std::invalid_argument{manager_->displayName() +
119119
" is not capable of resolving entity references"};
120120
}
121-
context_ = openassetio::Context::make();
121+
context_ = manager_->createContext();
122122
}
123123

124124
~UsdOpenAssetIOResolver() override = default;

0 commit comments

Comments
 (0)