Browse Source

guard against beneficiary == 0x0

Francisco Giordano 8 years ago
parent
commit
46fe7ee76d
1 changed files with 1 additions and 0 deletions
  1. 1 0
      contracts/crowdsale/Crowdsale.sol

+ 1 - 0
contracts/crowdsale/Crowdsale.sol

@@ -67,6 +67,7 @@ contract Crowdsale {
 
   // low level token purchase function
   function buyTokens(address beneficiary) payable {
+    require(beneficiary != 0x0);
     require(purchaseValid());
 
     uint256 weiAmount = msg.value;