mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
#14739 Fix null pointer crash in intersection result text builders
Guard against a null flatIntersectionPartMgr() in RiuResultTextBuilder and RiuFemResultTextBuilder. The part manager is only created when the display model is built, but result text can be requested (via selection updates) before that happens, e.g. right after appending a new intersection.
This commit is contained in:
1 parent
2120a13d63
commit
43c6e0b518
2 files changed
+2
-2
No files matched your search
@@ -151,7 +151,7 @@ QString RiuFemResultTextBuilder::geometrySelectionText( QString itemSeparator )
|
||||
text += QString( ", ijk[%1, %2, %3]" ).arg( i ).arg( j ).arg( k ) + itemSeparator;
|
||||
|
||||
QString formattedText;
|
||||
if ( m_2dIntersectionView )
|
||||
if ( m_2dIntersectionView && m_2dIntersectionView->flatIntersectionPartMgr() )
|
||||
{
|
||||
formattedText = QString( "Horizontal length from well start: %1" ).arg( m_intersectionPointInDisplay.x(), 5, 'f', 2 );
|
||||
text += formattedText + itemSeparator;
|
||||
|
||||
@@ -249,7 +249,7 @@ QString RiuResultTextBuilder::geometrySelectionText( const QString& itemSeparato
|
||||
if ( m_intersectionPointInDisplay != cvf::Vec3d::UNDEFINED )
|
||||
{
|
||||
QString formattedText;
|
||||
if ( m_2dIntersectionView )
|
||||
if ( m_2dIntersectionView && m_2dIntersectionView->flatIntersectionPartMgr() )
|
||||
{
|
||||
formattedText = QString( "Horizontal length from well start: %1" ).arg( m_intersectionPointInDisplay.x(), 5, 'f', 2 );
|
||||
text += formattedText + itemSeparator;
|
||||
|
||||
Reference in new issue
Block a user