diff options
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 5063df6..bbabc66 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -498,6 +498,14 @@ void MainWindow::onSessionNameClick() */ void MainWindow::onSessionNameUpdate() { + // Stop all projections and clear all clients, which where connected to old sessionName. + reset(); + for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) + { + (*it)->hide(); + (*it)->deleteLater(); + } + _clientFrames.clear(); _sessionNameLabel->setText(tr("Session Name: %1 [click to edit]").arg(Global::sessionName())); } @@ -992,7 +1000,8 @@ void MainWindow::onVncClientStateChange(Client* client) // VNC Client stopped -> remove from watchers if (!client->isActiveVncClient()){ // _watchers.remove(client->id()); - getClientFromId(client->id())->setWatcher(false); + if (getClientFromId(client->id()) != NULL) + getClientFromId(client->id())->setWatcher(false); // If noboody is watching the multicast stop VNC server // if (_watchers.isEmpty() && _mode != Mode::Broadcast) |