From fe0717421a74c8a93cb66edf2fa87b8e491908e4 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 29 Mar 2009 13:43:23 +0000 Subject: [PATCH 1/1] More sanity checking git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8642 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/bcomm/dircomm.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bacula/src/qt-console/bcomm/dircomm.cpp b/bacula/src/qt-console/bcomm/dircomm.cpp index 82e71a4785..c3de1c6e90 100644 --- a/bacula/src/qt-console/bcomm/dircomm.cpp +++ b/bacula/src/qt-console/bcomm/dircomm.cpp @@ -270,6 +270,7 @@ int DirComm::read() int stat = 0; while (m_sock) { for (;;) { + if (!m_sock) break; stat = m_sock->wait_data_intr(0, 50000); if (stat > 0) { break; @@ -280,6 +281,9 @@ int DirComm::read() m_console->messagesPending(false); } } + if (!m_sock) { + return BNET_HARDEOF; + } m_sock->msg[0] = 0; stat = sock_read(); if (stat >= 0) { -- 2.39.5