diff --git a/contracts/lib/Errors.sol b/contracts/lib/Errors.sol index 787fa9299..e46eb9c1a 100644 --- a/contracts/lib/Errors.sol +++ b/contracts/lib/Errors.sol @@ -13,6 +13,11 @@ library Errors { error IPAccount__InvalidCalldata(); error IPAccount__InvalidAccessController(); + //////////////////////////////////////////////////////////////////////////// + // CoreMetadataModule // + //////////////////////////////////////////////////////////////////////////// + error CoreMetadataModule__ZeroAccessManager(); + //////////////////////////////////////////////////////////////////////////// // Module // //////////////////////////////////////////////////////////////////////////// diff --git a/contracts/modules/metadata/CoreMetadataModule.sol b/contracts/modules/metadata/CoreMetadataModule.sol index c210a5987..18cdfa43b 100644 --- a/contracts/modules/metadata/CoreMetadataModule.sol +++ b/contracts/modules/metadata/CoreMetadataModule.sol @@ -50,6 +50,9 @@ contract CoreMetadataModule is /// @notice Initializes the CoreMetadataModule contract. function initialize(address accessManager) public initializer { + if (accessManager == address(0)) { + revert Errors.CoreMetadataModule__ZeroAccessManager(); + } __AccessManaged_init(accessManager); __UUPSUpgradeable_init(); }