]> git.mxchange.org Git - flightgear.git/commitdiff
Apply multiplayer crash on exit fix from Pigeon
authorfrohlich <frohlich>
Sun, 23 Apr 2006 09:03:21 +0000 (09:03 +0000)
committerfrohlich <frohlich>
Sun, 23 Apr 2006 09:03:21 +0000 (09:03 +0000)
src/Network/multiplay.cxx

index d9eb5ea375e5106d4118bdc021d59f9d6fee870e..a55de0eadc7cd0a34e707d5772b1422ae1adc198 100644 (file)
@@ -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();
 
   }