guard against a null scene

This commit is contained in:
Marco Martin 2011-11-16 11:23:15 +01:00
parent cedf8f0075
commit b24cc1646f

View File

@ -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;