guard against a null scene
This commit is contained in:
parent
cedf8f0075
commit
b24cc1646f
@ -79,7 +79,7 @@ void ToolTipProxy::syncTarget()
|
|||||||
QObject *parent = m_target.data();
|
QObject *parent = m_target.data();
|
||||||
while ((parent = parent->parent())) {
|
while ((parent = parent->parent())) {
|
||||||
QGraphicsObject *qo = qobject_cast<QGraphicsObject*>(parent);
|
QGraphicsObject *qo = qobject_cast<QGraphicsObject*>(parent);
|
||||||
if (qo) {
|
if (qo && qo->scene()) {
|
||||||
scene = qo->scene();
|
scene = qo->scene();
|
||||||
scene->addItem(m_target.data());
|
scene->addItem(m_target.data());
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user