diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-12 00:21:52 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-12 00:21:52 -0400 |
commit | a9cadc7f32fd9fd244fc3e22c62a35e7c257c084 (patch) | |
tree | d07a8b34608f46948505755a599c07da65a7fde7 /src/SMAPI/Framework/InternalExtensions.cs | |
parent | 09f69d986f4f44521d8a2cd745269dce4b83320e (diff) | |
parent | e943ae84136d46432e04e577041850d2aa7db43e (diff) | |
download | SMAPI-a9cadc7f32fd9fd244fc3e22c62a35e7c257c084.tar.gz SMAPI-a9cadc7f32fd9fd244fc3e22c62a35e7c257c084.tar.bz2 SMAPI-a9cadc7f32fd9fd244fc3e22c62a35e7c257c084.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/InternalExtensions.cs')
-rw-r--r-- | src/SMAPI/Framework/InternalExtensions.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/InternalExtensions.cs b/src/SMAPI/Framework/InternalExtensions.cs index 580651f3..ba9bbcec 100644 --- a/src/SMAPI/Framework/InternalExtensions.cs +++ b/src/SMAPI/Framework/InternalExtensions.cs @@ -64,7 +64,8 @@ namespace StardewModdingAPI.Framework /// <param name="event">The event to raise.</param> public static void RaiseEmpty<TEventArgs>(this ManagedEvent<TEventArgs> @event) where TEventArgs : new() { - @event.Raise(Singleton<TEventArgs>.Instance); + if (@event.HasListeners) + @event.Raise(Singleton<TEventArgs>.Instance); } /**** |