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,13 +456,19 @@ namespace SabreTools
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
encounteredErrors = true;
|
||||
archive.Dispose();
|
||||
if (archive != null)
|
||||
{
|
||||
archive.Dispose();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex.ToString());
|
||||
encounteredErrors = true;
|
||||
archive.Dispose();
|
||||
if (archive != null)
|
||||
{
|
||||
archive.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user