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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java

Issue 2521863002: [Custom Tab] Fix a crash when getting a screenshot of a tab (Closed)
Patch Set: Created 4 years, 1 month 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: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java
index 44dd1d005759a643ca340c647fe683fa2217ab0b..b4ad78c25271db6d6aee85e8ee68abe89bb3c663 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabObserver.java
@@ -188,6 +188,7 @@ class CustomTabObserver extends EmptyTabObserver {
@Override
public void run() {
if (!tab.isHidden() && mCurrentState != STATE_RESET) return;
+ if (tab.getWebContents() == null) return;
tab.getWebContents().getContentBitmapAsync(
Bitmap.Config.ARGB_8888, mScaleForNavigationInfo, new Rect(), callback);
mScreenshotTakenForCurrentNavigation = true;
« 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