From cd64c19fa35208a6023e67a89f228624afd0fc12 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. All other warnings have been resolved. This should close issue #4. --- 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(); } }