C#: Address C# code comments.

This commit is contained in:
Cornelius Riemenschneider
2024-05-22 11:42:44 +02:00
parent b744f9fab9
commit 09f60e3e45
2 changed files with 17 additions and 15 deletions

View File

@@ -109,7 +109,7 @@ namespace Semmle.Extraction
{
// the attribute for the git information are always attached to the entry assembly by our build system
var assembly = Assembly.GetEntryAssembly();
var versionString = assembly!.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
var versionString = assembly?.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
if (versionString == null)
{
return "unknown (not built from internal bazel workspace)";