From 21c794780d01855ecffa2cf40dc5d5e4d6352038 Mon Sep 17 00:00:00 2001 From: Björn Hagemeister Date: Tue, 13 May 2014 16:46:28 +0200 Subject: Fix segmentation fault after looking all screens and there is one client disconnected. --- src/server/mainwindow/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/mainwindow/mainwindow.cpp') diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 00e4eb0..47f9610 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -737,7 +737,7 @@ void MainWindow::onButtonLock(bool checked) // Check if client is Tutor or the manager is also running on this machine. bool isManagerMachine = false; foreach (const QHostAddress &address, QNetworkInterface::allAddresses()) { - if (address != QHostAddress(QHostAddress::LocalHost) && c->ip() == address.toString()) + if (address != QHostAddress(QHostAddress::LocalHost) && c != NULL && c->ip() == address.toString()) isManagerMachine = true; } -- cgit v1.2.3-55-g7522