From 70cc9583af4e34bcb4a1797bdf1f1ed945bfbef9 Mon Sep 17 00:00:00 2001 From: efrick Date: Thu, 8 Aug 2024 12:36:16 -0400 Subject: [PATCH] Fix null warnings in AboutBox1 One warning was left because it should not ever return null unless the package has been damaged. --- AboutBox1.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AboutBox1.cs b/AboutBox1.cs index ae5d3a3..fb0f568 100644 --- a/AboutBox1.cs +++ b/AboutBox1.cs @@ -37,7 +37,7 @@ namespace PDF_Merge return titleAttribute.Title; } } - return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); + return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location); } } @@ -45,7 +45,7 @@ namespace PDF_Merge { get { - return Assembly.GetExecutingAssembly().GetName().Version.ToString(); + return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString(); } }