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:
parent
eaa31066bc
commit
c3b6c04245
@ -165,6 +165,8 @@ QAccessibleInterface *QAccessibleObject::childAt(int x, int y) const
|
|||||||
Q_ASSERT(childIface);
|
Q_ASSERT(childIface);
|
||||||
if (childIface->rect().contains(x,y)) {
|
if (childIface->rect().contains(x,y)) {
|
||||||
return childIface;
|
return childIface;
|
||||||
|
} else {
|
||||||
|
delete childIface;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user