diff options
Diffstat (limited to 'backends/platform/android/asset-archive.cpp')
-rw-r--r-- | backends/platform/android/asset-archive.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/backends/platform/android/asset-archive.cpp b/backends/platform/android/asset-archive.cpp index da378fb082..6680081c16 100644 --- a/backends/platform/android/asset-archive.cpp +++ b/backends/platform/android/asset-archive.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -295,7 +295,6 @@ AssetFdReadStream::AssetFdReadStream(JNIEnv *env, jobject assetfd) : jclass cls = env->GetObjectClass(_assetfd); MID_close = env->GetMethodID(cls, "close", "()V"); assert(MID_close); - env->DeleteLocalRef(cls); jmethodID MID_getStartOffset = env->GetMethodID(cls, "getStartOffset", "()J"); @@ -321,6 +320,8 @@ AssetFdReadStream::AssetFdReadStream(JNIEnv *env, jobject assetfd) : _fd = env->GetIntField(javafd, FID_descriptor); env->DeleteLocalRef(javafd); + + env->DeleteLocalRef(cls); } AssetFdReadStream::~AssetFdReadStream() { |