aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsolidity/AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/AST.cpp b/libsolidity/AST.cpp
index f7c84ccb..a849535a 100644
--- a/libsolidity/AST.cpp
+++ b/libsolidity/AST.cpp
@@ -556,7 +556,7 @@ void VariableDeclaration::checkTypeRequirements()
BOOST_THROW_EXCEPTION(createTypeError("Illegal use of \"constant\" specifier."));
if (!m_value)
BOOST_THROW_EXCEPTION(createTypeError("Uninitialized \"constant\" variable."));
- else if (!m_type->isValueType())
+ else if (m_type && !m_type->isValueType())
// TODO: const is implemented only for uint, bytesXX and enums types.
BOOST_THROW_EXCEPTION(createTypeError("Illegal use of \"constant\" specifier. \"constant\" is not implemented for this type yet."));
}