Android: Remove native views when their window is destroyd.

destroySurface() was not removing the native view as they are not
in the m_surfaces map.

Task-number: QTBUG-40159
Change-Id: Ib5457e0bd34141654fa47883f5e125d894b0bd05
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
Christian Strømme 2014-08-05 19:43:23 +02:00 committed by Christian Stromme
parent 4946ed0496
commit 1671dacb52

View File

@ -413,10 +413,9 @@ namespace QtAndroid
{
QMutexLocker lock(&m_surfacesMutex);
const auto &it = m_surfaces.find(surfaceId);
if (it == m_surfaces.end())
return;
if (it != m_surfaces.end())
m_surfaces.remove(surfaceId);
QJNIEnvironmentPrivate env;
if (!env)
return;