]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix bat seg fault
authorKern Sibbald <kern@sibbald.com>
Sun, 12 Sep 2010 09:42:38 +0000 (11:42 +0200)
committerKern Sibbald <kern@sibbald.com>
Sun, 12 Sep 2010 09:56:58 +0000 (11:56 +0200)
bacula/src/qt-console/bcomm/dircomm.cpp

index cfef0b44927dc9ea910e6d7e822ec49790cfee6d..4e6e978f26729c96dc5d1e0d73fb7cded978f161 100644 (file)
@@ -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;