From fbe80dc3d4f05fe94dd358a6f3965a36233886cf Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 25 Mar 2015 00:47:18 +0100 Subject: [PATCH] Fix crash --- OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java index 3765012bd8..bf87a4514a 100644 --- a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java +++ b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java @@ -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; }