From 4dbbc7dd53f1cc20c624d2406bc5f9c2773ada6b Mon Sep 17 00:00:00 2001 From: danmosemsft Date: Wed, 5 Aug 2015 23:16:05 -0700 Subject: [PATCH] Fix exception in source mapping --- swi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/swi.py b/swi.py index 787bb41..3892b43 100644 --- a/swi.py +++ b/swi.py @@ -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