Fix out of bounds crash

This commit is contained in:
Luis Ángel San Martín 2019-04-28 09:28:15 +02:00
parent bc6b51ecf5
commit 54a0610a06

View File

@ -459,10 +459,14 @@ void PropertiesDialog::setComics(QList<ComicDB> comics)
if(!comic.info.date.isNull())
{
QStringList date = (comic.info.date.toString()).split("/");
dayEdit->setText(date[0]);
monthEdit->setText(date[1]);
yearEdit->setText(date[2]);
if (date.length() == 3) {
dayEdit->setText(date[0]);
monthEdit->setText(date[1]);
yearEdit->setText(date[2]);
}
}
if(!comic.info.publisher.isNull())
publisherEdit->setText(comic.info.publisher.toString());
if(!comic.info.format.isNull())