From ed09c5602c7d328b3ddad87572cc3aa5be9cf6e1 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Wed, 20 Sep 2017 12:43:05 -0500 Subject: [PATCH] get cancel button working --- SpriteLibrary/SpriteEntryForm.Designer.cs | 1 + SpriteLibrary/SpriteInfo.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/SpriteLibrary/SpriteEntryForm.Designer.cs b/SpriteLibrary/SpriteEntryForm.Designer.cs index ba2819f..86975ac 100644 --- a/SpriteLibrary/SpriteEntryForm.Designer.cs +++ b/SpriteLibrary/SpriteEntryForm.Designer.cs @@ -174,6 +174,7 @@ this.btnCancel.TabIndex = 9; this.btnCancel.Text = "Cancel"; this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // btnApply // diff --git a/SpriteLibrary/SpriteInfo.cs b/SpriteLibrary/SpriteInfo.cs index feceb6d..3407aac 100644 --- a/SpriteLibrary/SpriteInfo.cs +++ b/SpriteLibrary/SpriteInfo.cs @@ -68,6 +68,7 @@ namespace SpriteLibrary public Sprite CreateSprite(SpriteController ControllerToUse, SpriteDatabase TheDatabaseToUse) { Sprite DestSprite = null; + if (ControllerToUse == null) return null; for (int index = 0; index < Animations.Count; index++) { AnimationInfo CurrentAnimation = Animations[index];