summaryrefslogtreecommitdiffstats
path: root/android/ui
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-08-03 15:12:27 +0100
committerKristian Monsen <kristianm@google.com>2011-08-03 17:17:13 +0100
commit59ef0e2497e0662fe4a4044c2c50dab449bfcb87 (patch)
tree6d4975803e99f413f296a993b433eed24da6cac8 /android/ui
parent3884d10329410214f9a64506c5af342d99e243d7 (diff)
downloadexternal_chromium-59ef0e2497e0662fe4a4044c2c50dab449bfcb87.zip
external_chromium-59ef0e2497e0662fe4a4044c2c50dab449bfcb87.tar.gz
external_chromium-59ef0e2497e0662fe4a4044c2c50dab449bfcb87.tar.bz2
Fix for bug 5105584
Check for JavaVM pointer being null before using it Change-Id: I8fe404eaf716893dc88375c69383033a25277569
Diffstat (limited to 'android/ui')
-rw-r--r--android/ui/base/l10n/l10n_util.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/android/ui/base/l10n/l10n_util.cc b/android/ui/base/l10n/l10n_util.cc
index 3a91174..5700ddd 100644
--- a/android/ui/base/l10n/l10n_util.cc
+++ b/android/ui/base/l10n/l10n_util.cc
@@ -54,9 +54,10 @@ JNIHelper::JNIHelper()
JNIHelper::~JNIHelper()
{
- JNIEnv* currentEnv = android::jni::GetJNIEnv();
- if (currentEnv)
- currentEnv->DeleteGlobalRef(mClassRef);
+ if (!mInited)
+ return;
+
+ android::jni::GetJNIEnv()->DeleteGlobalRef(mClassRef);
}
string16 JNIHelper::getLocalisedString(int message_id)