Browse Source

owner can't be set as heir

zava 7 years ago
parent
commit
e5960465a7
1 changed files with 1 additions and 0 deletions
  1. 1 0
      contracts/ownership/Inheritable.sol

+ 1 - 0
contracts/ownership/Inheritable.sol

@@ -45,6 +45,7 @@ contract Inheritable is Ownable {
   }
 
   function setHeir(address newHeir) public onlyOwner {
+    require(newHeir != owner);
     heartbeat();
     HeirChanged(owner, newHeir);
     heir = newHeir;