Android: Don't assert in add/removeWindow
No need to assert, returning when the window is already added or not removed is enough. Pick-to: 6.2 6.3 Fixes: QTBUG-100173 Change-Id: Id491f17612ce42c4e26e9d41ad38f0a6372775bd Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>bb10
parent
ed7666903b
commit
2da00bfc3a
|
|
@ -191,7 +191,9 @@ void QAndroidPlatformScreen::addWindow(QAndroidPlatformWindow *window)
|
|||
if (window->parent() && window->isRaster())
|
||||
return;
|
||||
|
||||
Q_ASSERT(!m_windowStack.contains(window));
|
||||
if (m_windowStack.contains(window))
|
||||
return;
|
||||
|
||||
m_windowStack.prepend(window);
|
||||
if (window->isRaster()) {
|
||||
m_rasterSurfaces.ref();
|
||||
|
|
@ -208,10 +210,10 @@ void QAndroidPlatformScreen::removeWindow(QAndroidPlatformWindow *window)
|
|||
if (window->parent() && window->isRaster())
|
||||
return;
|
||||
|
||||
|
||||
Q_ASSERT(m_windowStack.contains(window));
|
||||
m_windowStack.removeOne(window);
|
||||
Q_ASSERT(!m_windowStack.contains(window));
|
||||
|
||||
if (m_windowStack.contains(window))
|
||||
qWarning() << "Failed to remove window";
|
||||
|
||||
if (window->isRaster()) {
|
||||
m_rasterSurfaces.deref();
|
||||
|
|
|
|||
Loading…
Reference in New Issue