You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: freespace2/freespace.cpp
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6683,11 +6683,14 @@ void game_shutdown(void)
6683
6683
gr_clear();
6684
6684
gr_flip();
6685
6685
}
6686
-
6686
+
6687
+
// Free SEXP resources
6688
+
sexp_shutdown();
6689
+
6687
6690
// Free the scripting resources of the new UI first
6688
6691
scpui::shutdown_scripting();
6689
6692
6690
-
// Everything after this should be done without scripting so we can free those resources here
6693
+
// Everything after this should be done without scripting so we can free those resources here. By this point, all things that hold Lua References must be destroyed (such as Lua SEXPs)
6691
6694
Script_system.Clear();
6692
6695
6693
6696
// Deinitialize the new UI system, needs to be done after scripting shutdown to make sure the resources were
@@ -6729,8 +6732,6 @@ void game_shutdown(void)
6729
6732
6730
6733
scoring_close();
6731
6734
6732
-
// Free SEXP resources
6733
-
sexp_shutdown();
6734
6735
6735
6736
stars_close(); // clean out anything used by stars code
0 commit comments