• Artur Grunau's avatar
    DataNamePropertyWidget: fix null pointer deref · e28d6127
    Artur Grunau authored
    If a DataNamePropertyWidget is created for a DataNameProperty whose
    AccessInfo == READ, it doesn't instantiate a QLineEdit to display the
    property's value (QComboBox is used instead).
    Previously, the updateWidgetFromProperty method didn't check AccessInfo
    to see what display widget was in use, and simply always dereferenced
    the _lineEdit pointer. If AccessInfo == READ, it was null and the
    application crashed.
    Now updateWidgetFromProperty accesses only the combo box if
    AccessInfo == READ, and uses the line edit otherwise.
    Fixes #99
datanamepropertywidget.h 3.56 KB