mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-27 23:50:19 -05:00
Add missing check for null pointer
This commit is contained in:
1 parent
5a2a2bd575
commit
6da41a4c5a
1 file changed
+3
-1
@@ -120,11 +120,13 @@ void RimFileSurface::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
bool RimFileSurface::updateSurfaceData()
|
||||
{
|
||||
bool result = true;
|
||||
if ( m_triangleMeshData->geometry().first.empty() )
|
||||
if ( !m_triangleMeshData || m_triangleMeshData->geometry().first.empty() )
|
||||
{
|
||||
result = loadDataFromFile();
|
||||
}
|
||||
|
||||
if ( !m_triangleMeshData ) return false;
|
||||
|
||||
auto [vertices, tringleIndices] = m_triangleMeshData->geometry();
|
||||
|
||||
auto surface = new RigSurface;
|
||||
|
||||
Reference in new issue
Block a user