From: Christian Strømme Date: Fri, 16 Aug 2013 15:50:10 +0000 (+0200) Subject: Android: Use isValid() to check if the jobject is valid. X-Git-Tag: upstream/5.2.95+rc1~52^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca769ba264f868ea2f41f2656f7126218b428ad4;p=platform%2Fupstream%2Fqtmultimedia.git Android: Use isValid() to check if the jobject is valid. Change-Id: I5ec67b9b2abfae2e2c2a44f0bcc7c72cb54beb49 Reviewed-by: Yoann Lopes --- 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); }