Maelstrom: Crash fix, still not sure how this happened though (yet!)

https://github.com/libsdl-org/Maelstrom/commit/807b782319eab426a2f96057033e1d5a5cfb6040

From 807b782319eab426a2f96057033e1d5a5cfb6040 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 19 Sep 2012 22:43:22 -0700
Subject: [PATCH] Crash fix, still not sure how this happened though (yet!)

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

diff --git a/screenlib/UIDialogButton.cpp b/screenlib/UIDialogButton.cpp
index 511aa658..65674af0 100644
--- a/screenlib/UIDialogButton.cpp
+++ b/screenlib/UIDialogButton.cpp
@@ -61,7 +61,7 @@ UIDialogButton::OnClick()
 
 	if (m_statusID) {
 		UIPanel *panel = GetUI()->GetCurrentPanel();
-		if (panel->IsA(UIDialog::GetType())) {
+		if (panel && panel->IsA(UIDialog::GetType())) {
 			static_cast<UIDialog*>(panel)->SetDialogStatus(m_statusID);
 		}
 	}