Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkdeclarative
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#409
  • Loading branch information
deepin-ci-robot authored and 18202781743 committed Oct 31, 2024
1 parent e7d62b5 commit 6589785
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/private/dquickbehindwindowblur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Q_DECL_HIDDEN DSGBlendNode : public QSGRenderNode
}

bool m_isRestore = false;
DQuickBehindWindowBlur *m_item = nullptr;
QPointer<DQuickBehindWindowBlur> m_item = nullptr;
QMatrix4x4 m_lastMatrix;
QRegion m_lastClip;
qreal m_lastRadius = -1;
Expand All @@ -47,7 +47,10 @@ DSGBlendNode::DSGBlendNode(bool restore)

void DSGBlendNode::render(const QSGRenderNode::RenderState *state)
{
Q_ASSERT(m_item);
// m_item may become invalid when the referred blur behind item get destroyed by a Loader.
// Give up rendering in this case.
if (!m_item)
return;

if (m_isRestore)
return;
Expand Down

0 comments on commit 6589785

Please sign in to comment.