Android: Use isValid() to check if the jobject is valid.
authorChristian Strømme <christian.stromme@digia.com>
Fri, 16 Aug 2013 15:50:10 +0000 (17:50 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 21 Aug 2013 11:31:53 +0000 (13:31 +0200)
Change-Id: I5ec67b9b2abfae2e2c2a44f0bcc7c72cb54beb49
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
src/plugins/android/wrappers/jsurfacetexture.cpp

index 107f7be..34edf1b 100644 (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);
 }