| Index: content/browser/renderer_host/compositor_impl_android.cc
|
| diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
|
| index 78d6834a5ed77ad6b162d679dc31ab91d1cb29bd..b1578fdd5a942b041f3482c24be7a94ca7036bfd 100644
|
| --- a/content/browser/renderer_host/compositor_impl_android.cc
|
| +++ b/content/browser/renderer_host/compositor_impl_android.cc
|
| @@ -163,8 +163,10 @@ void CompositorImpl::SetWindowSurface(ANativeWindow* window) {
|
| void CompositorImpl::SetSurface(jobject surface) {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| base::android::ScopedJavaLocalRef<jobject> j_surface(env, surface);
|
| - if (surface) {
|
| - ANativeWindow* window = ANativeWindow_fromSurface(env, surface);
|
| + ANativeWindow* window = NULL;
|
| + if (surface)
|
| + window = ANativeWindow_fromSurface(env, surface);
|
| + if (window) {
|
| SetWindowSurface(window);
|
| ANativeWindow_release(window);
|
| {
|
|
|