source_mapping: Check for crytic_compile before acceding to it

pull/285/head
Josselin 6 years ago
parent 0c7b22d500
commit 341157f7e2
  1. 2
      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,

Loading…
Cancel
Save