on xenial help sign in
Make sure there's a window
commit510bd7748ab1f10f43fb81fab21beb96e524a17b authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 17 Feb 2015, 16:46 (12 years ago) parentabeb27e
1 file changed+4−2
tests/utils/modules/Unity/Test/TouchEventSequenceWrapper.cpp+4−2
tests/utils/modules/Unity/Test/TouchEventSequenceWrapper.cpp+4−2
@@ -28,8 +28,10 @@ void TouchEventSequenceWrapper::commit(bool processEvents)
2828{
2929 m_eventSequence.commit(processEvents);
3030#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
31− QQuickWindowPrivate *wp = QQuickWindowPrivate::get(m_item->window());
32− wp->flushDelayedTouchEvent();
31+ if (m_item->window()) {
32+ QQuickWindowPrivate *wp = QQuickWindowPrivate::get(m_item->window());
33+ wp->flushDelayedTouchEvent();
34+ }
3335#endif
3436}
3537