session refactoring

This commit is contained in:
doitux
2008-10-08 08:11:37 +00:00
parent 6bfd0b0dfb
commit 5924266b02
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -2935,7 +2935,7 @@ void gameTableImpl::showMaximized () {
void gameTableImpl::closeGameTable() {
if (myServerGuiInterface.get() && myServerGuiInterface->getSession()->isNetworkServerRunning()) {
if (myStartWindow->getMyServerGuiInterface().get() && myStartWindow->getMyServerGuiInterface()->getSession()->isNetworkServerRunning()) {
QMessageBox msgBox(QMessageBox::Warning, tr("Closing PokerTH during network game"),
tr("You are the hosting server. Do you want to close PokerTH anyway?"), QMessageBox::Yes | QMessageBox::No, this);
@@ -2943,7 +2943,7 @@ void gameTableImpl::closeGameTable() {
if (msgBox.exec() == QMessageBox::Yes ) {
myStartWindow->getSession()->terminateNetworkClient();
stopTimer();
if (myServerGuiInterface.get()) myServerGuiInterface->getSession()->terminateNetworkServer();
if (myStartWindow->getMyServerGuiInterface().get()) myStartWindow->getMyServerGuiInterface()->getSession()->terminateNetworkServer();
myStartWindow->show();
this->hide();
}