diff options
Diffstat (limited to 'src/quickshapes/qquickshapegenericrenderer.cpp')
-rw-r--r-- | src/quickshapes/qquickshapegenericrenderer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quickshapes/qquickshapegenericrenderer.cpp b/src/quickshapes/qquickshapegenericrenderer.cpp index 604da2a889..68102f1e0a 100644 --- a/src/quickshapes/qquickshapegenericrenderer.cpp +++ b/src/quickshapes/qquickshapegenericrenderer.cpp @@ -361,6 +361,9 @@ void QQuickShapeGenericRenderer::endSync(bool async) }); didKickOffAsync = true; #if QT_CONFIG(thread) + // qtVectorPathForPath() initializes a unique_ptr without locking. + // Do that before starting the threads as otherwise we get a race condition. + qtVectorPathForPath(r->path); pathWorkThreadPool->start(r); #endif } else { @@ -391,6 +394,9 @@ void QQuickShapeGenericRenderer::endSync(bool async) }); didKickOffAsync = true; #if QT_CONFIG(thread) + // qtVectorPathForPath() initializes a unique_ptr without locking. + // Do that before starting the threads as otherwise we get a race condition. + qtVectorPathForPath(r->path); pathWorkThreadPool->start(r); #endif } else { |