#14311 Fix crash selecting a polygon-in-view with no polygon assigned

The polygon field was added to the UI ordering by value rather than by
address, so an empty (null) polygon reference resolved to the
PdmObjectHandle overload of PdmUiOrdering::add and aborted on the null
assertion while building the property panel. Pass the field by address so
the field-handle overload is used, matching the other add calls.

Fixes #14311
This commit is contained in:
Kristian Bendiksen authored and Magne Sjaastad committed 2026-06-25 08:12:37 +02:00
1 parent 5536bce95f
commit fee59950fd
1 file changed
+1 -1
@@ -321,7 +321,7 @@ void RimPolygonInView::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
bool enableEdit = true;
if ( m_polygon() && m_polygon->isReadOnly() ) enableEdit = false;
uiOrdering.add( m_polygon );
uiOrdering.add( &m_polygon );
if ( enableEdit )
{