[Companion] AutoComboBox - fix possible crash with null field.

This commit is contained in:
Max Paperno
2018-06-02 21:10:51 -04:00
parent 6c51026357
commit 40c5f0432c
+1 -1
View File
@@ -93,7 +93,7 @@ class AutoComboBox: public QComboBox
{
for (int i=0; i<count(); ++i) {
setItemData(i, i);
if (*this->field == i)
if (this->field && *this->field == i)
setCurrentIndex(i);
}
}