Merge pull request #323 from pooleja/fix/ownable_error

Fix/ownable error - Silent transferOwnership Failure
This commit is contained in:
Francisco Giordano
2017-07-22 15:57:45 -03:00
committed by GitHub
2 changed files with 9 additions and 8 deletions

View File

@ -33,9 +33,8 @@ contract Ownable {
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
if (newOwner != address(0)) {
owner = newOwner;
}
require(newOwner != address(0));
owner = newOwner;
}
}