diff options
author | Marco Nelissen <marcone@google.com> | 2014-01-14 16:25:18 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-01-14 16:25:18 +0000 |
commit | 633f8c227bfbc8962d516a7fae4a8bf306d0aa53 (patch) | |
tree | d5bbeb24d0854f49109176b4b9307909c9ffd937 /media | |
parent | 35f922d1d038d14f94b584baae324513610f7813 (diff) | |
parent | 28f032e6a66d74d570b36672939000707455acb1 (diff) | |
download | frameworks_base-633f8c227bfbc8962d516a7fae4a8bf306d0aa53.zip frameworks_base-633f8c227bfbc8962d516a7fae4a8bf306d0aa53.tar.gz frameworks_base-633f8c227bfbc8962d516a7fae4a8bf306d0aa53.tar.bz2 |
am 28f032e6: am e2c046fe: am 13249411: am a9045d24: am 337aa376: Merge "Add NULL check in updateProxyConfig"
* commit '28f032e6a66d74d570b36672939000707455acb1':
Add NULL check in updateProxyConfig
Diffstat (limited to 'media')
-rw-r--r-- | media/jni/android_media_MediaPlayer.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp index 4be9cd6..5e3fb1a 100644 --- a/media/jni/android_media_MediaPlayer.cpp +++ b/media/jni/android_media_MediaPlayer.cpp @@ -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) { + thisplayer->updateProxyConfig(host, port, exclusionList); - if (exclusionList != NULL) { - env->ReleaseStringUTFChars(exclusionListObj, exclusionList); - exclusionList = NULL; + env->ReleaseStringUTFChars(exclusionListObj, exclusionList); + exclusionList = NULL; + } else { + thisplayer->updateProxyConfig(host, port, ""); + } + } else if (host != NULL) { + thisplayer->updateProxyConfig(host, port, ""); } if (host != NULL) { |