cancel main loop before game_shutdown() to avoid calling it more than
authorTaylor Richards <taylor@icculus.org>
Wed, 28 Feb 2018 21:33:35 +0000 (16:33 -0500)
committerTaylor Richards <taylor@icculus.org>
Sat, 17 Mar 2018 15:31:15 +0000 (11:31 -0400)
once

src/freespace2/freespace.cpp

index 1415923..040bbab 100644 (file)
@@ -6745,8 +6745,8 @@ void game_loop_caller()
        }
 
        if ( !game_loop() ) {
-               game_shutdown();
                emscripten_cancel_main_loop();
+               game_shutdown();
        }
 }
 #endif