diff options
Diffstat (limited to 'src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp')
-rw-r--r-- | src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp b/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp index 94912778f8..1154c06d7c 100644 --- a/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp +++ b/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp @@ -183,7 +183,9 @@ void QSGDefaultDepthStencilBuffer::free() QSGDepthStencilBufferManager::~QSGDepthStencilBufferManager() { for (Hash::const_iterator it = m_buffers.constBegin(), cend = m_buffers.constEnd(); it != cend; ++it) { - QSGDepthStencilBuffer *buffer = it.value().data(); + QSharedPointer<QSGDepthStencilBuffer> buffer = it.value().toStrongRef(); + Q_ASSERT_X(buffer, "~QSGDepthStencilBufferManager", + "~QSGDepthStencilBuffer is supposed to unregister from the manager"); buffer->free(); buffer->m_manager = nullptr; } |