diff --git a/aqt/studydeck.py b/aqt/studydeck.py index 42705a132..2fd04596a 100644 --- a/aqt/studydeck.py +++ b/aqt/studydeck.py @@ -95,6 +95,10 @@ class StudyDeck(QDialog): return True def accept(self): + row = self.form.list.currentRow() + if row < 0: + showInfo(_("Please select something.")) + return self.name = self.names[self.form.list.currentRow()] QDialog.accept(self)