From: Kern Sibbald Date: Sun, 12 Sep 2010 09:42:38 +0000 (+0200) Subject: Fix bat seg fault X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c6140b1e0376c491df1def6dc7cd20719fc58ea2;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;