[Digikam-devel] [digikam] [Bug 326542] Tagging some face then go to tag manager and test tag manager UI...

Gilles Caulier caulier.gilles at gmail.com
Thu Oct 24 10:51:35 BST 2013


https://bugs.kde.org/show_bug.cgi?id=326542

--- Comment #5 from Gilles Caulier <caulier.gilles at gmail.com> ---
Veaceslav,

Accordingly with BT; crash is in this code :

int ListItem::row() const
{
    if (d->parentItem)
        return
d->parentItem->d->childItems.indexOf(const_cast<ListItem*>(this));

    return 0;
}

I recommend to check the cast of "const_cast<ListItem*>(this)" using
dynamic_cast and to check returned value to see if it's null, before to use it
with indexOf(). Something like this :

ListItem* const item = dynamic_cast<ListItem*>(this);
if (item)
{
...
}

Gilles

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list