diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp index 85d40e2..7d61562 100644 --- a/limereport/items/lrtextitem.cpp +++ b/limereport/items/lrtextitem.cpp @@ -63,7 +63,7 @@ TextItem::TextItem(QObject *owner, QGraphicsItem *parent) PageItemDesignIntf* pageItem = dynamic_cast(parent); BaseDesignIntf* parentItem = dynamic_cast(parent); - while (!pageItem){ + while (!pageItem && parentItem){ parentItem = dynamic_cast(parentItem->parentItem()); pageItem = dynamic_cast(parentItem); }