Fixed nullref in TakePhotoState

This commit is contained in:
2025-11-10 12:53:03 +01:00
parent a6e3413499
commit 9c61065947
2 changed files with 14 additions and 6 deletions

View File

@@ -281,7 +281,15 @@ public class AudioManager : ManagedBehaviour, IPausable
{
foreach (AppleAudioSource source in criticalVOSources)
{
source.InterruptAudio("GlobalInterrupt");
if (source == null)
{
return;
}
else
{
source.InterruptAudio("GlobalInterrupt");
}
}
foreach (AppleAudioSource source in VOSources)

View File

@@ -50,9 +50,9 @@ public class BushAudioController : ManagedBehaviour
}
public void OnDisable()
{
// Unsubscribe from events when disabled
_eventSource.AudioStopped -= PlayBirdCounter;
}
//public void OnDisable()
//{
// // Unsubscribe from events when disabled
// _eventSource.AudioStopped -= PlayBirdCounter;
//}
}