[Companion] AutoComboBox - fix possible crash with null field.
This commit is contained in:
@@ -93,7 +93,7 @@ class AutoComboBox: public QComboBox
|
|||||||
{
|
{
|
||||||
for (int i=0; i<count(); ++i) {
|
for (int i=0; i<count(); ++i) {
|
||||||
setItemData(i, i);
|
setItemData(i, i);
|
||||||
if (*this->field == i)
|
if (this->field && *this->field == i)
|
||||||
setCurrentIndex(i);
|
setCurrentIndex(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user