#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 committed 2026-06-24 16:06:12 +02:00
1 parent e3f7e3f1c7
commit 1c39fed294
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 )
{