Slightly safer checks before invoking

This commit is contained in:
Matt Nadareski
2022-03-14 11:26:10 -07:00
parent 513e799aa3
commit 914497b76f

View File

@@ -138,7 +138,7 @@ namespace BurnOutSharp.FileType
});
// If we have a NE executable, iterate through all NE content checks
if (nex != null)
if (nex?.DOSStubHeader != null)
{
Parallel.ForEach(neContentCheckClasses, contentCheckClass =>
{
@@ -165,7 +165,7 @@ namespace BurnOutSharp.FileType
}
// If we have a PE executable, iterate through all PE content checks
if (pex != null)
if (pex?.SectionTable != null)
{
Parallel.ForEach(peContentCheckClasses, contentCheckClass =>
{