From 1bc6afe8e0eb21e83f0acda8fdb263670e3172e8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 21 Jul 2014 09:21:30 +0200 Subject: [PATCH] Check for window != 0 in QuickTestResult::grabImage(). Task-number: QTBUG-38945 Change-Id: I081434a94899f8a1e2fd7275b67f62d06b56b0c2 Reviewed-by: Kai Koehne --- src/qmltest/quicktestresult.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp index a168645..44256f3 100644 --- a/src/qmltest/quicktestresult.cpp +++ b/src/qmltest/quicktestresult.cpp @@ -685,7 +685,7 @@ void QuickTestResult::stopBenchmark() QObject *QuickTestResult::grabImage(QQuickItem *item) { - if (item) { + if (item && item->window()) { QQuickWindow *window = item->window(); QImage grabbed = window->grabWindow(); QRectF rf(item->x(), item->y(), item->width(), item->height()); -- 2.7.4