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>
bb10
Christian Strømme 2014-08-05 19:43:23 +02:00 committed by Christian Stromme
parent 4946ed0496
commit 1671dacb52
1 changed files with 2 additions and 3 deletions

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);
m_surfaces.remove(surfaceId);
QJNIEnvironmentPrivate env;
if (!env)
return;