Skip to content

Commit 4b51489

Browse files
committed
Added check of chip size for erase operation
1 parent 63dfe9d commit 4b51489

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

qt/main_window.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@ void MainWindow::slotProgErase()
259259
int index = ui->chipSelectComboBox->currentIndex();
260260
uint32_t eraseSize = chipDb.sizeGetById(CHIP_INDEX2ID(index));
261261

262+
if (!eraseSize)
263+
{
264+
qCritical() << "Chip size is not set";
265+
return;
266+
}
267+
262268
connect(prog, SIGNAL(eraseChipCompleted(int)), this,
263269
SLOT(slotProgEraseCompleted(int)));
264270

0 commit comments

Comments
 (0)