Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdkon committed Nov 13, 2024
1 parent 648cbc9 commit ed004d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/pointcloud/qgspointcloudstatscalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ struct StatsProcessor
else
{
QgsPointCloudBlockRequest *request = mIndex->asyncNodeData( node, mRequest );
if ( request == nullptr )
{
QgsDebugError( QStringLiteral( "Unable to calculate statistics for node %1: Got nullptr async request" ).arg( node.toString() ) );
return QgsPointCloudStatistics();
}
QEventLoop loop;
QObject::connect( request, &QgsPointCloudBlockRequest::finished, &loop, &QEventLoop::quit );
QObject::connect( mFeedback, &QgsFeedback::canceled, &loop, &QEventLoop::quit );
Expand Down

0 comments on commit ed004d8

Please sign in to comment.