Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIMOB-6295 Android: ImageView NPE in async download callback #766

Merged
merged 1 commit into from
Nov 24, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2009-2011 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
Expand Down Expand Up @@ -159,7 +159,9 @@ public void downloadFinished(URI uri)
// via the "old way" (not relying on cache).
synchronized (imageTokenGenerator) {
token = imageTokenGenerator.incrementAndGet();
imageSources.get(0).getBitmapAsync(new BgImageLoader(requestedWidth, requestedHeight, token));
if (imageSources != null && imageSources.size() > 0) {
imageSources.get(0).getBitmapAsync(new BgImageLoader(requestedWidth, requestedHeight, token));
}
}
} else {
firedLoad = false;
Expand Down