From 9e61446d12ca9793a9cad75d1ba7c630bed1812f Mon Sep 17 00:00:00 2001 From: frohlich Date: Sun, 23 Apr 2006 09:03:21 +0000 Subject: [PATCH] Apply multiplayer crash on exit fix from Pigeon --- src/Network/multiplay.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Network/multiplay.cxx b/src/Network/multiplay.cxx index d9eb5ea37..a55de0ead 100644 --- a/src/Network/multiplay.cxx +++ b/src/Network/multiplay.cxx @@ -219,13 +219,19 @@ bool FGMultiplay::process() { ******************************************************************/ bool FGMultiplay::close() { + FGMultiplayMgr *mgr = globals->get_multiplayer_mgr(); + + if (mgr == 0) { + return false; + } + if (get_direction() == SG_IO_IN) { - globals->get_multiplayer_mgr()->Close(); + mgr->Close(); } else if (get_direction() == SG_IO_OUT) { - globals->get_multiplayer_mgr()->Close(); + mgr->Close(); }