Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #81 from koush/master
Browse files Browse the repository at this point in the history
BitmapDrawable with a null Bitmap is valid/legal
  • Loading branch information
vinc3m1 committed Mar 5, 2015
2 parents 00bd0c4 + a683859 commit d49aa62
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ public static Drawable fromDrawable(Drawable drawable) {
Bitmap bm = drawableToBitmap(drawable);
if (bm != null) {
return new RoundedDrawable(bm);
} else {
Log.w(TAG, "Failed to create bitmap from drawable!");
}
}
return drawable;
Expand All @@ -132,6 +130,7 @@ public static Bitmap drawableToBitmap(Drawable drawable) {
drawable.draw(canvas);
} catch (Exception e) {
e.printStackTrace();
Log.w(TAG, "Failed to create bitmap from drawable!");
bitmap = null;
}

Expand Down

0 comments on commit d49aa62

Please sign in to comment.