diff --git a/core/contracts/Dispatcher.sol b/core/contracts/Dispatcher.sol index cb24deb2d..d175a5fe9 100644 --- a/core/contracts/Dispatcher.sol +++ b/core/contracts/Dispatcher.sol @@ -27,6 +27,8 @@ contract Dispatcher is Router, Ownable { function migrateShares(IERC4626[] calldata _vaults) public onlyOwner { address newDispatcher = address(acre.dispatcher()); + require(newDispatcher != address(0), "new dispatcher address cannot be zero address"); + for (uint i=0; i<_vaults.length; i++) { _vaults[i].transfer(newDispatcher, _vaults[i].balanceOf(address(this))); }