Android: Use isValid() to check if the jobject is valid.

Change-Id: I5ec67b9b2abfae2e2c2a44f0bcc7c72cb54beb49
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
Christian Strømme
2013-08-16 17:50:10 +02:00
committed by The Qt Project
parent 4585518d52
commit ca769ba264

View File

@@ -60,13 +60,13 @@ JSurfaceTexture::JSurfaceTexture(unsigned int texName)
, QJNIObject(g_qtSurfaceTextureClass, "(I)V", jint(texName))
, m_texID(int(texName))
{
if (m_jobject)
if (isValid())
g_objectMap.insert(int(texName), this);
}
JSurfaceTexture::~JSurfaceTexture()
{
if (m_jobject)
if (isValid())
g_objectMap.remove(m_texID);
}