mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Dispose only if there's something to dispose
This commit is contained in:
@@ -456,15 +456,21 @@ namespace SabreTools
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
encounteredErrors = true;
|
||||
if (archive != null)
|
||||
{
|
||||
archive.Dispose();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex.ToString());
|
||||
encounteredErrors = true;
|
||||
if (archive != null)
|
||||
{
|
||||
archive.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get a list of files including size and hashes
|
||||
Crc32 crc = new Crc32();
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace SabreTools.Helper
|
||||
/// - Create log files by date
|
||||
/// - Clean up log files if there are more than x number per program
|
||||
/// - Allow for "triggerable" logging done on an interval (async)
|
||||
/// - Log filtering?
|
||||
/// - Log filtering? (#if debug?)
|
||||
/// </remarks>
|
||||
public class Logger
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user