mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-02 20:30:46 -06:00
#14279 Guard line editor editing-finished against deleted field
This commit is contained in:
1 parent
203cf83334
commit
d7d3938986
1 file changed
+5
@@ -350,6 +350,11 @@ QMargins PdmUiLineEditor::calculateLabelContentMargins() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void PdmUiLineEditor::slotEditingFinished()
|
void PdmUiLineEditor::slotEditingFinished()
|
||||||
{
|
{
|
||||||
|
// The field may have been destroyed (e.g. its owning object was deleted) while the editor still
|
||||||
|
// had focus. Hiding the editor during teardown emits editingFinished, so guard against the now
|
||||||
|
// null field before committing. PdmUiItem::~PdmUiItem() clears the editor's item pointer.
|
||||||
|
if ( !uiField() ) return;
|
||||||
|
|
||||||
QVariant v;
|
QVariant v;
|
||||||
|
|
||||||
uiField()->enableAutoValue( false );
|
uiField()->enableAutoValue( false );
|
||||||
|
|||||||
Reference in new issue
Block a user