Fix to IntEventArgsHandler

Dec 4, 2013 at 12:29 AM
IntEventArgsHandler can be called when _file is null (e.g. SevenZipExtractor.CurrentLibraryFeatures) so adding a check here prevents a useless exception:
private void IntEventArgsHandler(object sender, IntEventArgs e) {
    if (_files != null) { // YD
        lock (_files) {
             ...
        }
    }  // YD
}
Dec 6, 2013 at 6:56 PM
You're welcome.

What you did to fix this is not the ideal thing. Sure, ArchiveUpdateCallback is internal but it's wiser, to use a "private object _instanceAccess = new object();" and lock onto it rather than "this".
private void IntEventArgsHandler(object sender, IntEventArgs e) {
    lock (this) {
Dec 6, 2013 at 8:13 PM
Edited Dec 6, 2013 at 8:22 PM
Discard that 2nd wrong comment, sorry.

I was looking at an older version of the source cope: it looks like the source code package from https://sevenzipsharp.codeplex.com/downloads/get/145910 is different than what you can download from https://sevenzipsharp.codeplex.com/SourceControl/latest. I was looking at the former for that 2nd comment.