Fix another null deref in the dashboard

This commit is contained in:
pancake 2017-04-03 10:21:45 +02:00
parent b82e932ad7
commit 013375c64c

View File

@ -113,8 +113,10 @@ void Dashboard::updateContents() {
QString libs = this->main->core->cmd("il");
QStringList lines = libs.split("\n", QString::SkipEmptyParts);
lines.removeFirst();
lines.removeLast();
if (lines) {
lines.removeFirst();
lines.removeLast();
}
foreach (QString lib, lines) {
QLabel *label = new QLabel(this);
label->setText(lib);