diff --git a/samples/unity-of-bugs/Assets/Scripts/BugFarmButtons.cs b/samples/unity-of-bugs/Assets/Scripts/BugFarmButtons.cs index 213d87d68..8ed690b65 100644 --- a/samples/unity-of-bugs/Assets/Scripts/BugFarmButtons.cs +++ b/samples/unity-of-bugs/Assets/Scripts/BugFarmButtons.cs @@ -15,7 +15,7 @@ private void Start() public void AssertFalse() => Assert.AreEqual(true, false); [MethodImpl(MethodImplOptions.NoInlining)] - public void ThrowNull() => throw null; + public void ThrowNull() => throw new NullReferenceException(); public void ThrowExceptionAndCatch() {