Skip to content

Commit e38dec9

Browse files
committed
Fix possible NullReferenceException when a BSMLAutomaticViewController is disabled
1 parent 17e084e commit e38dec9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

BeatSaberMarkupLanguage/ViewControllers/WatcherGroup.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ private void CreateWatcher()
188188

189189
private void DestroyWatcher()
190190
{
191+
if (Watcher == null)
192+
{
193+
return;
194+
}
195+
191196
#if HRVC_DEBUG
192197
Logger.Log.Debug($"Destroying FileSystemWatcher for {ContentDirectory}");
193198
#endif

0 commit comments

Comments
 (0)