Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #846 from sawilde/coverity190103
Browse files Browse the repository at this point in the history
handle symbolReader being null
  • Loading branch information
sawilde authored Jan 3, 2019
2 parents 508ad90 + 422470f commit 698c8c5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main/OpenCover.Framework/Symbols/CecilSymbolManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ private void LoadSourceAssembly()
{
var symbolReader = new DefaultSymbolReaderProvider(true)
.GetSymbolReader(_sourceAssembly.MainModule, _sourceAssembly.MainModule.FileName);
_sourceAssembly.MainModule.ReadSymbols(symbolReader);

if (symbolReader != null)
{
_sourceAssembly.MainModule.ReadSymbols(symbolReader);
}
else
{
_sourceAssembly = null;
}
}
}
catch (FileNotFoundException)
Expand Down

0 comments on commit 698c8c5

Please sign in to comment.