Merge pull request #24 from trailofbits/patch/6/ensureconsistency

Fixes #22
This commit is contained in:
Ricardo Guilherme Schmidt 2019-06-13 01:15:18 -03:00 committed by GitHub
commit 9fcf3fb396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -66,7 +66,8 @@ contract StickerMarket is Controlled, NFTokenEnumerable, ApproveAndCallFallBack
}
modifier packOwner(uint256 _packId) {
require(msg.sender == controller || packs[_packId].owner == msg.sender);
address owner = packs[_packId].owner;
require((msg.sender == owner) || (owner != address(0) && msg.sender == controller));
_;
}