mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Since #7786, the GUI tick completed normally after calling closePageCallback instead of being cancelled like previously. Since Engine.EndGame deletes the internal g_Game pointer, every Engine call after it that tried to access g_Game caused a segfault. This patch solves it by moving Engine.EndGame to the very end, right before closing the session page.
34 lines
887 B
JavaScript
34 lines
887 B
JavaScript
class QuitConfirmation extends SessionMessageBox
|
|
{
|
|
}
|
|
|
|
QuitConfirmation.prototype.Title =
|
|
translate("Confirmation");
|
|
|
|
QuitConfirmation.prototype.Caption =
|
|
translate("The game has finished, what do you want to do?");
|
|
|
|
QuitConfirmation.prototype.Buttons =
|
|
[
|
|
{
|
|
// Translation: Shown in the Dialog that shows up when the game finishes
|
|
"caption": translate("Stay"),
|
|
"onPress": resumeGame
|
|
},
|
|
{
|
|
// Translation: Shown in the Dialog that shows up when the game finishes
|
|
"caption": translate("Quit and View Summary"),
|
|
"onPress": () => getNextPageOpenRequest(true)
|
|
},
|
|
{
|
|
// Translation: Shown in the Dialog that shows up when the game finishes
|
|
"caption": translate("Quit"),
|
|
"onPress": () => getNextPageOpenRequest(false)
|
|
}
|
|
];
|
|
|
|
QuitConfirmation.prototype.Width = 600;
|
|
QuitConfirmation.prototype.Height = 200;
|
|
|
|
QuitConfirmation.prototype.ResumeOnClose = false;
|
|
|