Maelstrom: Fixed double-free on exit

https://github.com/libsdl-org/Maelstrom/commit/c77275fb79b3534a4fb6a71126d08a10de3a2315

From c77275fb79b3534a4fb6a71126d08a10de3a2315 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 6 Nov 2012 01:05:13 -0800
Subject: [PATCH] Fixed double-free on exit

---
 screenlib/UIElementButton.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/screenlib/UIElementButton.cpp b/screenlib/UIElementButton.cpp
index 2b2693ef..f2977e2d 100644
--- a/screenlib/UIElementButton.cpp
+++ b/screenlib/UIElementButton.cpp
@@ -46,6 +46,7 @@ UIElementButton::~UIElementButton()
 		SDL_free(m_clickPanel);
 	}
 
+	SetImage((UITexture*)0);
 	for (int i = 0; i < SDL_arraysize(m_stateImages); ++i) {
 		UITexture *image = m_stateImages[i];
 		if (image) {