don't set the QObject parent with the parentWidget if the parentWidget is null

This commit is contained in:
Aaron Seigo 2011-04-30 10:10:42 +02:00
parent b35a4dd02c
commit eb871eca6a

View File

@ -392,7 +392,9 @@ void Corona::addOffscreenWidget(QGraphicsWidget *widget)
QGraphicsWidget *pw = widget->parentWidget();
widget->setParentItem(0);
widget->setParent(pw);
if (pw) {
widget->setParent(pw);
}
//kDebug() << "adding offscreen widget at slot " << i;
if (!widget->scene()) {