Fix memory leak in childAt

Delete the interface if it's not returned.

Change-Id: Ia1e1f94d14584ab3af1b89a0baac5d343ffdd1f4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
Morten Johan Sorvig 2012-12-13 14:23:44 +01:00 committed by The Qt Project
parent eaa31066bc
commit c3b6c04245

View File

@ -165,6 +165,8 @@ QAccessibleInterface *QAccessibleObject::childAt(int x, int y) const
Q_ASSERT(childIface);
if (childIface->rect().contains(x,y)) {
return childIface;
} else {
delete childIface;
}
}
return 0;