From 59b52d3f778f0c351997b6fa5389919755031d50 Mon Sep 17 00:00:00 2001 From: Raul Date: Mon, 15 Apr 2024 12:07:52 -0300 Subject: [PATCH] missing check --- contracts/lib/Errors.sol | 5 +++++ contracts/modules/metadata/CoreMetadataModule.sol | 3 +++ 2 files changed, 8 insertions(+) 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(); }