diff --git a/SpriteLibrary/SpriteEntryForm.cs b/SpriteLibrary/SpriteEntryForm.cs index 8b8fb40..b287a60 100644 --- a/SpriteLibrary/SpriteEntryForm.cs +++ b/SpriteLibrary/SpriteEntryForm.cs @@ -478,6 +478,11 @@ namespace SpriteLibrary void ApplyChanges() { + if (tbSpriteName.Text == "") + { + MessageBox.Show("You cannot save a sprite that has no name."); + return; + } FormToSpriteInformation(); if (CurrentSIIndex > 0 && CurrentSIIndex < SpriteInformation.Count) { @@ -498,7 +503,12 @@ namespace SpriteLibrary /// bool PromptToApplyChangesAndContinue() { - if(ValuesDifferFromData()) + if (tbSpriteName.Text == "") + { + MessageBox.Show("You cannot save a sprite that has no name."); + return true; + } + if (ValuesDifferFromData()) { DialogResult Answer = MessageBox.Show("You have unsaved Changes. Would you like to save them before proceeding?","Save?",MessageBoxButtons.YesNoCancel); if (Answer == DialogResult.Yes) ApplyChanges();