Fixed NullPointerException in ImageDiskCache

This commit is contained in:
daniel oeh 2014-06-14 11:05:59 +02:00
parent 1e28ad36df
commit 4c4b28062d
1 changed files with 8 additions and 0 deletions

View File

@ -189,6 +189,10 @@ public class ImageDiskCache {
* The image will be stored in the thumbnail cache.
*/
public void loadThumbnailBitmap(final String url, final ImageView target, final int length) {
if (url == null) {
Log.w(TAG, "loadThumbnailBitmap: Call was ignored because url = null");
return;
}
final ImageLoader il = ImageLoader.getInstance();
target.setTag(R.id.image_disk_cache_key, url);
if (diskCache != null) {
@ -217,6 +221,10 @@ public class ImageDiskCache {
* The image will be stored in the cover cache.
*/
public void loadCoverBitmap(final String url, final ImageView target, final int length) {
if (url == null) {
Log.w(TAG, "loadCoverBitmap: Call was ignored because url = null");
return;
}
final ImageLoader il = ImageLoader.getInstance();
target.setTag(R.id.image_disk_cache_key, url);
if (diskCache != null) {