From c6140b1e0376c491df1def6dc7cd20719fc58ea2 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 12 Sep 2010 11:42:38 +0200 Subject: [PATCH] Fix bat seg fault --- bacula/src/qt-console/bcomm/dircomm.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bacula/src/qt-console/bcomm/dircomm.cpp b/bacula/src/qt-console/bcomm/dircomm.cpp index cfef0b4492..4e6e978f26 100644 --- a/bacula/src/qt-console/bcomm/dircomm.cpp +++ b/bacula/src/qt-console/bcomm/dircomm.cpp @@ -179,7 +179,9 @@ bool DirComm::connect_dir() mainWin->actionConnect->setIcon(QIcon(":images/connected.png")); QBrush greenBrush(Qt::green); QTreeWidgetItem *item = mainWin->getFromHash(m_console); - item->setForeground(0, greenBrush); + if (item) { + item->setForeground(0, greenBrush); + } } jcr->dir_bsock = m_sock; -- 2.39.5