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();
while ((parent = parent->parent())) {
QGraphicsObject *qo = qobject_cast<QGraphicsObject*>(parent);
if (qo) {
if (qo && qo->scene()) {
scene = qo->scene();
scene->addItem(m_target.data());
break;