From: Kern Sibbald Date: Sun, 12 Sep 2010 09:42:38 +0000 (+0200) Subject: Fix bat seg fault X-Git-Tag: Release-5.2.1~1119 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=10ee9d810f331ba9aa335d31d3d6e2573615c6cd;p=bacula%2Fbacula Fix bat seg fault --- 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;