Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdkon authored and wonder-sk committed Nov 14, 2024
1 parent 8037f2d commit daf91f1
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 daf91f1

Please sign in to comment.