am e2c046fe: am 13249411: am a9045d24: am 337aa376: Merge "Add NULL check in updateProxyConfig"

* commit 'e2c046fe7c5eefb49f710bc417d54448c133cc93':
  Add NULL check in updateProxyConfig
This commit is contained in:
Marco Nelissen
2014-01-14 16:21:43 +00:00
committed by Android Git Automerger

View File

@ -826,16 +826,19 @@ android_media_MediaPlayer_updateProxyConfig(
jstring exclusionListObj = (jstring)env->CallObjectMethod(
proxyProps, fields.proxyConfigGetExclusionList);
const char *exclusionList =
env->GetStringUTFChars(exclusionListObj, NULL);
if (host != NULL && exclusionListObj != NULL) {
thisplayer->updateProxyConfig(host, port, exclusionList);
}
const char *exclusionList = env->GetStringUTFChars(exclusionListObj, NULL);
if (exclusionList != NULL) {
env->ReleaseStringUTFChars(exclusionListObj, exclusionList);
exclusionList = NULL;
if (exclusionList != NULL) {
thisplayer->updateProxyConfig(host, port, exclusionList);
env->ReleaseStringUTFChars(exclusionListObj, exclusionList);
exclusionList = NULL;
} else {
thisplayer->updateProxyConfig(host, port, "");
}
} else if (host != NULL) {
thisplayer->updateProxyConfig(host, port, "");
}
if (host != NULL) {