Fix Event treeWidget crash

This commit is contained in:
Mark Watkins 2011-06-27 17:51:37 +10:00
parent da8bf0ad38
commit 1368afa7c5

View File

@ -785,6 +785,7 @@ void Daily::RedrawGraphs()
void Daily::on_treeWidget_itemSelectionChanged()
{
QTreeWidgetItem *item=ui->treeWidget->selectedItems().at(0);
if (!item) return;
QDateTime d;
if (!item->text(1).isEmpty()) {
d=d.fromString(item->text(1),"yyyy-MM-dd HH:mm:ss");