From a5450d3aed25f9cda48717d0568b3f8119baf85f Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Tue, 30 Jan 2024 02:10:25 +0300 Subject: [PATCH] Fix nullable ptr usage. --- src/sw/driver/source_file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sw/driver/source_file.cpp b/src/sw/driver/source_file.cpp index ff6e4d87..e917a2fc 100644 --- a/src/sw/driver/source_file.cpp +++ b/src/sw/driver/source_file.cpp @@ -135,7 +135,7 @@ void SourceFileStorage::add_unchecked1(const path &file_in, bool skip, const Str auto nt = target.as(); auto ho = nt && nt->HeaderOnly && nt->HeaderOnly.value(); - if (nt->UseModules && nt->ImplicitHeaderUnits && isCppHeaderFileExtension(ext) && !skip) + if (nt && nt->UseModules && nt->ImplicitHeaderUnits && isCppHeaderFileExtension(ext) && !skip) { nt->add(HeaderUnit{file}); return;