Skip to content

Commit

Permalink
Fix exception in source mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
danmoseley committed Aug 6, 2015
1 parent ddfd0f3 commit 4dbbc7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion swi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,10 @@ def set_selection(view, start_line, start_column, end_line, end_column):
def get_authored_position_if_necessary(file_name, line_number, column_number):
if is_source_map_enabled():
mapping = projectsystem.DocumentMapping.MappingsManager.get_mapping(file_name)
return mapping.get_authored_position(line_number, line_number)
if mapping:
return mapping.get_authored_position(line_number, line_number)

return None

def is_source_map_enabled():
global source_map_state
Expand Down

0 comments on commit 4dbbc7d

Please sign in to comment.