Skip to content

Commit

Permalink
[BUG] System.NullReferenceException WatcherProcessItem (#491), versio…
Browse files Browse the repository at this point in the history
…n 1.3.2.8
  • Loading branch information
Hofknecht committed Aug 25, 2023
1 parent b2f3a93 commit b30b919
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions Business/Menus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1332,18 +1332,17 @@ private void WatcherProcessItem(object sender, EventArgs e)

if (e is RenamedEventArgs renamedEventArgs)
{
menus[0].Invoke(() => RenameItem(renamedEventArgs));
menus[0]?.Invoke(() => RenameItem(renamedEventArgs));
}
else
else if (e is FileSystemEventArgs fileSystemEventArgs)
{
FileSystemEventArgs fileSystemEventArgs = (FileSystemEventArgs)e;
if (fileSystemEventArgs.ChangeType == WatcherChangeTypes.Deleted)
{
menus[0].Invoke(() => DeleteItem(e as FileSystemEventArgs));
menus[0]?.Invoke(() => DeleteItem(e as FileSystemEventArgs));
}
else if (fileSystemEventArgs.ChangeType == WatcherChangeTypes.Created)
{
menus[0].Invoke(() => CreateItem(e as FileSystemEventArgs));
menus[0]?.Invoke(() => CreateItem(e as FileSystemEventArgs));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.2.7")]
[assembly: AssemblyFileVersion("1.3.2.7")]
[assembly: AssemblyVersion("1.3.2.8")]
[assembly: AssemblyFileVersion("1.3.2.8")]

0 comments on commit b30b919

Please sign in to comment.