From ca769ba264f868ea2f41f2656f7126218b428ad4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20Str=C3=B8mme?= Date: Fri, 16 Aug 2013 17:50:10 +0200 Subject: [PATCH] Android: Use isValid() to check if the jobject is valid. Change-Id: I5ec67b9b2abfae2e2c2a44f0bcc7c72cb54beb49 Reviewed-by: Yoann Lopes --- src/plugins/android/wrappers/jsurfacetexture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/android/wrappers/jsurfacetexture.cpp b/src/plugins/android/wrappers/jsurfacetexture.cpp index 107f7be..34edf1b 100644 --- a/src/plugins/android/wrappers/jsurfacetexture.cpp +++ b/src/plugins/android/wrappers/jsurfacetexture.cpp @@ -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); } -- 2.7.4