Skip to content

Commit

Permalink
Fix possible NullReferenceException when a BSMLAutomaticViewControlle…
Browse files Browse the repository at this point in the history
…r is disabled
  • Loading branch information
nicoco007 committed Sep 11, 2024
1 parent 17e084e commit e38dec9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BeatSaberMarkupLanguage/ViewControllers/WatcherGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ private void CreateWatcher()

private void DestroyWatcher()
{
if (Watcher == null)
{
return;
}

#if HRVC_DEBUG
Logger.Log.Debug($"Destroying FileSystemWatcher for {ContentDirectory}");
#endif
Expand Down

0 comments on commit e38dec9

Please sign in to comment.