From 341157f7e225d49c928d852507b41b03f6a0d8bd Mon Sep 17 00:00:00 2001 From: Josselin Date: Tue, 25 Jun 2019 21:17:46 +0200 Subject: [PATCH] source_mapping: Check for crytic_compile before acceding to it --- slither/core/source_mapping/source_mapping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,