Another possible solution might be to do 2 things:
1. Set modal to nullptr only after calling disconnect
2. Showing the message only if model != nullptr and logging to console otherwise
So,
d->modal = nullptr;
WLApplication::emergency_save(game);
d->game = nullptr;
disconnect("CLIENT_CRASHED");
// We will bounce back to the main menu, so we better log out
if (internet_) {
InternetGaming::ref().logout("CLIENT_CRASHED");
}
Could become
WLApplication::emergency_save(game);
d->game = nullptr;
disconnect("CLIENT_CRASHED");
// We will bounce back to the main menu, so we better log out
if (internet_) {
InternetGaming::ref().logout("CLIENT_CRASHED");
}
d->modal = nullptr;
Another possible solution might be to do 2 things:
1. Set modal to nullptr only after calling disconnect
2. Showing the message only if model != nullptr and logging to console otherwise
So,
d->modal = nullptr; ::emergency_ save(game) ; "CLIENT_ CRASHED" ); ng::ref( ).logout( "CLIENT_ CRASHED" );
WLApplication
d->game = nullptr;
disconnect(
// We will bounce back to the main menu, so we better log out
if (internet_) {
InternetGami
}
Could become
WLApplication ::emergency_ save(game) ; "CLIENT_ CRASHED" ); ng::ref( ).logout( "CLIENT_ CRASHED" );
d->game = nullptr;
disconnect(
// We will bounce back to the main menu, so we better log out
if (internet_) {
InternetGami
}
d->modal = nullptr;