diff --git a/libsolidity/SourceReferenceFormatter.cpp b/libsolidity/SourceReferenceFormatter.cpp index a30621a1e..87796aa32 100644 --- a/libsolidity/SourceReferenceFormatter.cpp +++ b/libsolidity/SourceReferenceFormatter.cpp @@ -95,7 +95,7 @@ void SourceReferenceFormatter::printExceptionInformation(ostream& _stream, if (location) { - solAssert(scanner, ""); + scanner = &_compiler.getScanner(*location->sourceName); printSourceLocation(_stream, *location, *scanner); }