fixed uninitialized memory read in FileDetail struct causing weird dates in search dialog

This commit is contained in:
csoler 2023-06-03 23:51:31 +02:00
parent ad9d566767
commit 3f8e8805a2
2 changed files with 11 additions and 8 deletions

View file

@ -91,7 +91,8 @@ class RSHumanReadableAgeDelegate: public RSHumanReadableDelegate
QStyleOptionViewItem opt(option) ;
setPainterOptions(painter,opt,index) ;
painter->drawText(opt.rect, Qt::AlignCenter, misc::timeRelativeToNow(index.data().toLongLong())) ;
if(index.data().toLongLong() > 0) // no date is present.
painter->drawText(opt.rect, Qt::AlignCenter, misc::timeRelativeToNow(index.data().toLongLong())) ;
}
};