diff --git a/src/app/dialogs/tools/dialogdetail.cpp b/src/app/dialogs/tools/dialogdetail.cpp index cbbe47047..d3d909b94 100644 --- a/src/app/dialogs/tools/dialogdetail.cpp +++ b/src/app/dialogs/tools/dialogdetail.cpp @@ -340,11 +340,12 @@ void DialogDetail::ClickedReverse(bool checked) */ void DialogDetail::ObjectChanged(int row) { - if (ui.listWidget->count() == 0 || row == -1) + if (ui.listWidget->count() == 0 || row == -1 || row >= ui.listWidget->count()) { return; } const QListWidgetItem *item = ui.listWidget->item( row ); + SCASSERT(item != nullptr); const VNodeDetail node = qvariant_cast(item->data(Qt::UserRole)); ui.doubleSpinBoxBiasX->setValue(qApp->fromPixel(node.getMx())); ui.doubleSpinBoxBiasY->setValue(qApp->fromPixel(node.getMy()));