From 20204fe58b77d7f62d3dac4e574bdef528199518 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Tue, 5 Feb 2013 16:43:07 +0100 Subject: Do not crash if the child index is out of range. Task-number: QTBUG-29077 Change-Id: I934101cdc121e9ef99de2e9eeaef154dd4cae0d8 Reviewed-by: Frederik Gladhorn --- tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/auto/other') diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 68fde2fd2e..b0d0459326 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -3113,6 +3113,11 @@ void tst_QAccessibility::bridgeTest() // **** Test accLocation **** long x, y, w, h; + // Do not crash on insane arguments. + varChild.lVal = 999; + hr = iaccButton->accLocation(&x, &y, &w, &h, varChild); + QCOMPARE(SUCCEEDED(hr), false); + hr = iaccButton->accLocation(&x, &y, &w, &h, varSELF); QCOMPARE(buttonRect, QRect(x, y, w, h)); -- cgit v1.2.3