From 6f010b49332cbae07b8730aba60e2ee5b1cbeb10 Mon Sep 17 00:00:00 2001 From: Martin Dobias Date: Fri, 21 Feb 2025 11:12:42 +0100 Subject: [PATCH] Fix assert when trying to update a node that's not loaded yet --- src/3d/chunks/qgschunkedentity.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/3d/chunks/qgschunkedentity.cpp b/src/3d/chunks/qgschunkedentity.cpp index d6f7a464b74..3382cea9b99 100644 --- a/src/3d/chunks/qgschunkedentity.cpp +++ b/src/3d/chunks/qgschunkedentity.cpp @@ -323,6 +323,18 @@ void QgsChunkedEntity::updateNodes( const QList &nodes, QgsChunk { cancelActiveJob( node->updater() ); } + else if ( node->state() == QgsChunkNode::Skeleton || node->state() == QgsChunkNode::QueuedForLoad ) + { + // there is not much to update yet + continue; + } + else if ( node->state() == QgsChunkNode::Loading ) + { + // let's cancel the current loading job and queue for loading again + cancelActiveJob( node->loader() ); + requestResidency( node ); + continue; + } Q_ASSERT( node->state() == QgsChunkNode::Loaded );