From: frohlich Date: Sun, 23 Apr 2006 09:03:21 +0000 (+0000) Subject: Apply multiplayer crash on exit fix from Pigeon X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9e61446d12ca9793a9cad75d1ba7c630bed1812f;p=flightgear.git Apply multiplayer crash on exit fix from Pigeon --- 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(); }