Fix an error with the database recursing infinitely

This commit is contained in:
Tim Young 2017-09-21 06:53:35 -05:00
parent c402e3f173
commit 9cce19c067

View File

@ -259,8 +259,8 @@ namespace SpriteLibrary
/// <returns></returns> /// <returns></returns>
internal Sprite SmartDuplicateSprite(SpriteController theController, string SpriteName, bool UseSmartImages = true) internal Sprite SmartDuplicateSprite(SpriteController theController, string SpriteName, bool UseSmartImages = true)
{ {
Sprite DestSprite = theController.DuplicateSprite(SpriteName); Sprite DestSprite = theController.SpriteFromNameInternal(SpriteName);
if (DestSprite != null) return DestSprite; if (DestSprite != null) return new Sprite(DestSprite);
//If it does not exist, make it //If it does not exist, make it
foreach (SpriteInfo SI in SpriteInfoList) foreach (SpriteInfo SI in SpriteInfoList)