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

Unified Diff: chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc

Issue 2285163003: [Offline pages] Fixing a crash when notification for removed downloaded page is clicked (Closed)
Patch Set: Created 4 years, 4 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: chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
diff --git a/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc b/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
index 5215f366cf1e8360c9b2e4acf1d82263ad2b62e3..107d712f679fb4eb95f7d361c7b8326d931d0500 100644
--- a/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
+++ b/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
@@ -178,6 +178,8 @@ ScopedJavaLocalRef<jobject> OfflinePageDownloadBridge::GetItemByGuid(
const JavaParamRef<jstring>& j_guid) {
std::string guid = ConvertJavaStringToUTF8(env, j_guid);
const DownloadUIItem* item = download_ui_adapter_->GetItem(guid);
+ if (item == nullptr)
+ return ScopedJavaLocalRef<jobject>();
return ToJavaOfflinePageDownloadItem(env, *item);
}
« 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