diff --git a/slither/core/source_mapping/source_mapping.py b/slither/core/source_mapping/source_mapping.py index 8f922c05c..564b2f0e1 100644 --- a/slither/core/source_mapping/source_mapping.py +++ b/slither/core/source_mapping/source_mapping.py @@ -101,7 +101,7 @@ class SourceMapping(Context): else: filename = filename_used - if filename in slither.crytic_compile.src_content: + if slither.crytic_compile and filename in slither.crytic_compile.src_content: source_code = slither.crytic_compile.src_content[filename] (lines, starting_column, ending_column) = SourceMapping._compute_line(source_code, s,