aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-10-14 17:51:08 +0800
committerGitHub <noreply@github.com>2016-10-14 17:51:08 +0800
commit1584c5992e05a4eb0b7a9335edd4e7b3e272c29b (patch)
tree5108c8e4c9a0f399cb9468f164dde79c501a9d74
parent0635b6e008fc9eaa6e96d91101e420012db6bb83 (diff)
parent8e11bac8dee78f0133dd1a06644dc8b55123c58c (diff)
downloaddexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar
dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.gz
dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.bz2
dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.lz
dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.xz
dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.zst
dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.zip
Merge pull request #1218 from ethereum/null-integer-type
Add a null-pointer check
-rw-r--r--libsolidity/ast/Types.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 6d1af534..edb0fbe4 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -574,7 +574,11 @@ bool RationalNumberType::isImplicitlyConvertibleTo(Type const& _convertTo) const
{
FixedBytesType const& fixedBytes = dynamic_cast<FixedBytesType const&>(_convertTo);
if (!isFractional())
- return fixedBytes.numBytes() * 8 >= integerType()->numBits();
+ {
+ if (integerType())
+ return fixedBytes.numBytes() * 8 >= integerType()->numBits();
+ return false;
+ }
else
return false;
}