Maelstrom: Fixed button parent traversal

https://github.com/libsdl-org/Maelstrom/commit/4ab05864ac980dc0a3a0314c68ae3d4f1eae5898

From 4ab05864ac980dc0a3a0314c68ae3d4f1eae5898 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 23 Nov 2012 03:27:39 -0800
Subject: [PATCH] Fixed button parent traversal

---
 screenlib/UIDialogButton.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/screenlib/UIDialogButton.cpp b/screenlib/UIDialogButton.cpp
index 9dec0301..71b65f2e 100644
--- a/screenlib/UIDialogButton.cpp
+++ b/screenlib/UIDialogButton.cpp
@@ -60,7 +60,8 @@ UIDialogButton::OnClick()
 	UIBaseElement *parent;
 	UIPanel *panel = NULL;
 
-	while (!panel && (parent = GetParent()) != NULL) {
+	parent = this;
+	while (!panel && (parent = parent->GetParent()) != NULL) {
 		panel = parent->Cast<UIPanel>();
 	}