Maelstrom: Remove the game from the global server before shutting down the network.

https://github.com/libsdl-org/Maelstrom/commit/1b040095483aad64d0a8af135f728045b50a222c

From 1b040095483aad64d0a8af135f728045b50a222c Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 27 Nov 2011 01:10:28 -0500
Subject: [PATCH] Remove the game from the global server before shutting down
 the network.

---
 game/lobby.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/game/lobby.cpp b/game/lobby.cpp
index 797995f3..84e687dd 100644
--- a/game/lobby.cpp
+++ b/game/lobby.cpp
@@ -305,6 +305,11 @@ LobbyDialogDelegate::OnPoll()
 void
 LobbyDialogDelegate::SetHostOrJoin(void*, int value)
 {
+	// Remove the game before shutting down the network
+	if (m_state == STATE_HOSTING && m_globalGame->IsChecked()) {
+		RemoveGame();
+	}
+
 	// This is called when the lobby switches from hosting to joining
 	HaltNetData();