diff options
-rw-r--r-- | vala/valasourcefile.vala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala index 35eaf5f26..acaea0d7c 100644 --- a/vala/valasourcefile.vala +++ b/vala/valasourcefile.vala @@ -197,6 +197,13 @@ public class Vala.SourceFile { } public void remove_node (CodeNode node) { + // Also update the entry point of the current code context + var code_context = CodeContext.get (); + unowned Vala.Method? entry_point = code_context.entry_point; + if (entry_point != null && entry_point.source_reference == node.source_reference) { + code_context.entry_point = null; + } + nodes.remove (node); } |