diff --git a/QtPMbrowser/DlgSelectParameters.h b/QtPMbrowser/DlgSelectParameters.h index a5df5b5..0102661 100644 --- a/QtPMbrowser/DlgSelectParameters.h +++ b/QtPMbrowser/DlgSelectParameters.h @@ -69,8 +69,12 @@ class DlgSelectParameters : public QDialog std::array& ar) { for (int i = 0; i < int(ar.size()); ++i) { - ar[i].exportIBW = (qobject_cast(grid->itemAtPosition(i, 0)->widget()))->isChecked(); - ar[i].print = (qobject_cast(grid->itemAtPosition(i, 1)->widget()))->isChecked(); + auto chkExport = qobject_cast(grid->itemAtPosition(i, 0)->widget()); + assert(chkExport); + ar[i].exportIBW = chkExport->isChecked(); + auto chkPrint = qobject_cast(grid->itemAtPosition(i, 1)->widget()); + assert(chkPrint); + ar[i].print = chkPrint->isChecked(); } }