Check for NPE in AsyncImageView

pull/14/head
Sam Bosley 13 years ago
parent 8217c2579b
commit a24821f66e

@ -61,6 +61,9 @@ public class AsyncImageView extends greendroid.widget.AsyncImageView {
layout(0, 0, getMeasuredWidth(), getMeasuredHeight());
buildDrawingCache(true);
Bitmap drawingCache = getDrawingCache();
if (drawingCache == null)
return null;
Bitmap b = Bitmap.createBitmap(getDrawingCache());
setDrawingCacheEnabled(false); // clear drawing cache
return b;

Loading…
Cancel
Save