Fix warnings about calling nativeResource when no handle exists.

Triggered for example by Qt Designer's new form dialog.

Change-Id: I63a1f1e5425e8d5fc60c10418a715143e65443f1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
Friedemann Kleint 2013-01-14 13:01:12 +01:00 committed by The Qt Project
parent 13a1e7a444
commit ac864956f8

View File

@ -190,6 +190,8 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
}
QPlatformNativeInterface *platform = QGuiApplication::platformNativeInterface();
if (!window->handle()) // Called before show(), no native window yet.
return;
HWND hWnd = (HWND)platform->nativeResourceForWindow("handle", window);
static int eventNum = 0;