Skip to content

Commit

Permalink
Fix bug where 3D view crashes on renderer recreation
Browse files Browse the repository at this point in the history
Bug occurs when the vpc data is not complete and 3D renderer gets
recreated
  • Loading branch information
Withalion committed Jan 9, 2025
1 parent 980fa88 commit 0a0fb70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/3d/qgsvirtualpointcloudentity_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ void QgsVirtualPointCloudEntity::createChunkedEntityForSubIndex( int i )
const QVector<QgsPointCloudSubIndex> subIndexes = provider()->subIndexes();
const QgsPointCloudSubIndex &si = subIndexes.at( i );

// Skip if Index is not yet loaded or is outside the map extents
if ( !si.index() || mBboxes.at( i ).isEmpty() )
// Skip if Index is not yet loaded or is outside the map extents or it's not valid (e.g. file is missing)
if ( !si.index() || mBboxes.at( i ).isEmpty() || !si.index()->isValid() )
return;

QgsPointCloudLayerChunkedEntity *newChunkedEntity = new QgsPointCloudLayerChunkedEntity(
Expand Down

0 comments on commit 0a0fb70

Please sign in to comment.