Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: ui/android/window_android.cc

Issue 1028953002: Check null java object when request vsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: semicolon Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/window_android.cc
diff --git a/ui/android/window_android.cc b/ui/android/window_android.cc
index 172a7ae2f37f51600e7dcb5c32f5c875cbdca96b..cb163ff817da316f5f01edc92c2c256068c07a88 100644
--- a/ui/android/window_android.cc
+++ b/ui/android/window_android.cc
@@ -72,7 +72,10 @@ void WindowAndroid::DetachCompositor() {
void WindowAndroid::RequestVSyncUpdate() {
JNIEnv* env = AttachCurrentThread();
- Java_WindowAndroid_requestVSyncUpdate(env, GetJavaObject().obj());
+ ScopedJavaLocalRef<jobject> obj = GetJavaObject();
+ if (obj.is_null())
+ return;
+ Java_WindowAndroid_requestVSyncUpdate(env, obj.obj());
}
void WindowAndroid::SetNeedsAnimate() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698