Skip to content

Commit

Permalink
fix networkimageview url verification
Browse files Browse the repository at this point in the history
  • Loading branch information
djodjoni committed Mar 21, 2016
1 parent 00d005e commit 7743ad0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ public void onError(JusError error) {
@Override
public void onResponse(final ImageContainer response, boolean isImmediate) {
//verify if we expect the same url
if (NetworkImageView.this.mUrl != response.getRequestUrl()) {
if (NetworkImageView.this.mUrl == null ||
!NetworkImageView.this.mUrl.equals(response.getRequestUrl())) {
Log.w("NetworkImageView", "received: " + response.getRequestUrl()
+ ", expected: " + NetworkImageView.this.mUrl);
return;
Expand Down Expand Up @@ -226,7 +227,7 @@ public void run() {
*/
protected static boolean isOk2Draw(Bitmap bitmap) {
//ignore this if bitmap is null.
if(bitmap==null) return true;
if (bitmap == null) return true;

if (bitmap.isRecycled()) {
return false;
Expand Down

0 comments on commit 7743ad0

Please sign in to comment.