From 871c93e14e20927a70a12bc2e7edec31df2ef8e9 Mon Sep 17 00:00:00 2001 From: ell1e Date: Fri, 24 Nov 2023 19:55:50 +0100 Subject: [PATCH] compiler: Fix crash with some broken code DCO-1.1-Signed-off-by: Ellie --- src/compiler/storage/scope/manage.h64 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/storage/scope/manage.h64 b/src/compiler/storage/scope/manage.h64 index eb4e2f31..8ce4e07d 100644 --- a/src/compiler/storage/scope/manage.h64 +++ b/src/compiler/storage/scope/manage.h64 @@ -111,6 +111,9 @@ func project.ProjectFile.try_lookup_symbol_path( entry.storage_info.storage_id] ) } + if entry.symbol_info == none { + return none + } return new storage_ref.StorageRef( storage_ref.ST_GLOBAL, entry.symbol_info.storage_id