nullptr check added
This commit is contained in:
parent
8dd5a7b249
commit
d1c2751a8e
|
@ -88,6 +88,8 @@ void QskSGNode::setParentNode( QSGNode* node, QSGNode* parent )
|
||||||
|
|
||||||
QSGNode* QskSGNode::findChildNode( QSGNode* parent, quint8 role )
|
QSGNode* QskSGNode::findChildNode( QSGNode* parent, quint8 role )
|
||||||
{
|
{
|
||||||
|
if ( parent )
|
||||||
|
{
|
||||||
auto node = parent->firstChild();
|
auto node = parent->firstChild();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
|
@ -96,6 +98,7 @@ QSGNode* QskSGNode::findChildNode( QSGNode* parent, quint8 role )
|
||||||
|
|
||||||
node = node->nextSibling();
|
node = node->nextSibling();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue