Fix crash

This commit is contained in:
Victor Shcherb 2015-03-25 00:47:18 +01:00
parent 254f5f3271
commit fbe80dc3d4

View file

@ -26,16 +26,19 @@ public class DirectionDrawable extends Drawable {
this(ctx, width, height);
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
arrowImage = iconsCache.getIcon(resourceId, clrId);
this.resourceId = resourceId;
}
public void setImage(int resourceId, int clrId) {
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
arrowImage = iconsCache.getIcon(resourceId, clrId);
arrowImage = iconsCache.getIcon(resourceId, clrId);
this.resourceId = resourceId;
}
public void setImage(int resourceId){
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
arrowImage = iconsCache.getIcon(resourceId, 0);
this.resourceId = resourceId;
}