From 89bf795f105ebe2703ee74a021e16786990ca7b2 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 10 Dec 2024 03:49:38 -0800 Subject: Fix a crash when search for files. (#5818) Co-authored-by: Ellie Hermaszewska --- source/slang/slang.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index e4de61276..9e9b5fbe3 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -4257,7 +4257,7 @@ SourceFile* Linkage::findFile(Name* name, SourceLoc loc, IncludeSystem& outInclu // Next, try to find the file of the given name, // using our ordinary include-handling logic. - auto searchDirs = getSearchDirectories(); + auto& searchDirs = getSearchDirectories(); outIncludeSystem = IncludeSystem(&searchDirs, getFileSystemExt(), getSourceManager()); // Get the original path info -- cgit v1.2.3