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

Unified Diff: ui/android/java/src/org/chromium/ui/resources/ResourceManager.java

Issue 2368373003: Check resource bitmap before calling onResourceReady (Closed)
Patch Set: Created 4 years, 3 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/java/src/org/chromium/ui/resources/ResourceManager.java
diff --git a/ui/android/java/src/org/chromium/ui/resources/ResourceManager.java b/ui/android/java/src/org/chromium/ui/resources/ResourceManager.java
index c3eb05caba446590836e4aabc63daca653e4b098..5b77c074519954533d710e522e869858e6484230 100644
--- a/ui/android/java/src/org/chromium/ui/resources/ResourceManager.java
+++ b/ui/android/java/src/org/chromium/ui/resources/ResourceManager.java
@@ -139,7 +139,7 @@ public class ResourceManager implements ResourceLoaderCallback {
@SuppressWarnings("cast")
@Override
public void onResourceLoaded(int resType, int resId, Resource resource) {
- if (resource == null) return;
+ if (resource == null || resource.getBitmap() == null) return;
if (resType != AndroidResourceType.CRUSHED_SPRITE) {
saveMetadataForLoadedResource(resType, resId, resource);
« 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