fix deprecation warnings beign repeated if the mod can't be identified

This commit is contained in:
Jesse Plamondon-Willard 2016-11-19 00:09:39 -05:00
parent d7be19e8f4
commit 6a48094995
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,8 @@
See [log](https://github.com/CLxS/SMAPI/compare/1.1...master).
This is a patch release that addresses compatibility with older mods.
* Fixed deprecation warnings being repeated if the mod can't be identified.
## 1.1
See [log](https://github.com/CLxS/SMAPI/compare/1.0...1.1).

View File

@ -49,7 +49,7 @@ namespace StardewModdingAPI.Framework
public void Warn(string source, string nounPhrase, string version, DeprecationLevel severity)
{
// ignore if already warned
if (source != null && !this.MarkWarned(source, nounPhrase, version))
if (!this.MarkWarned(source ?? "<unknown>", nounPhrase, version))
return;
// build message