From b2f3a21ceb9d69340a6bc0b9d98b5952fa634b99 Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Wed, 30 Sep 2015 10:57:34 +0200 Subject: QFrameGraph: check that activeFrameGraph is not null Otherwise we try to set the parent on a null object Change-Id: I0dff1a8374dd1540bddb109b112ea73081db0f39 Reviewed-by: Andy Nichols --- src/render/framegraph/qframegraph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/render/framegraph') diff --git a/src/render/framegraph/qframegraph.cpp b/src/render/framegraph/qframegraph.cpp index b8357f396..a6193a4c9 100644 --- a/src/render/framegraph/qframegraph.cpp +++ b/src/render/framegraph/qframegraph.cpp @@ -131,7 +131,7 @@ void QFrameGraph::setActiveFrameGraph(QFrameGraphNode *activeFrameGraph) Q_D(QFrameGraph); if (activeFrameGraph != d->m_activeFrameGraph) { - if (!activeFrameGraph->parent()) + if (activeFrameGraph != Q_NULLPTR && !activeFrameGraph->parent()) activeFrameGraph->setParent(this); d->m_activeFrameGraph = activeFrameGraph; -- cgit v1.2.3