#14279 Guard line editor editing-finished against deleted field

This commit is contained in:
Magne Sjaastad
2026-06-23 07:31:21 +02:00
parent 203cf83334
commit d7d3938986
@@ -350,6 +350,11 @@ QMargins PdmUiLineEditor::calculateLabelContentMargins() const
//--------------------------------------------------------------------------------------------------
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;
uiField()->enableAutoValue( false );