XmlThemeBuilder: fix texture loaded from style patterns (#729)

This commit is contained in:
Murray Hughes
2019-06-22 14:06:03 -06:00
committed by Emux
parent c526599e20
commit 368cf1ff4a

View File

@@ -6,6 +6,7 @@
* Copyright 2016 Andrey Novikov * Copyright 2016 Andrey Novikov
* Copyright 2018-2019 Gustl22 * Copyright 2018-2019 Gustl22
* Copyright 2018 Izumi Kawashima * Copyright 2018 Izumi Kawashima
* Copyright 2019 Murray Hughes
* *
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org). * This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
* *
@@ -651,7 +652,8 @@ public class XmlThemeBuilder extends DefaultHandler {
b.stippleWidth = 1; b.stippleWidth = 1;
b.stippleColor = b.fillColor; b.stippleColor = b.fillColor;
} else { } else {
b.texture = Utils.loadTexture(mTheme.getRelativePathPrefix(), src, b.symbolWidth, b.symbolHeight, b.symbolPercent); if (src != null)
b.texture = Utils.loadTexture(mTheme.getRelativePathPrefix(), src, b.symbolWidth, b.symbolHeight, b.symbolPercent);
if (hasSymbol) { if (hasSymbol) {
// Line symbol // Line symbol
@@ -764,7 +766,8 @@ public class XmlThemeBuilder extends DefaultHandler {
logUnknownAttribute(elementName, name, value, i); logUnknownAttribute(elementName, name, value, i);
} }
b.texture = Utils.loadTexture(mTheme.getRelativePathPrefix(), src, b.symbolWidth, b.symbolHeight, b.symbolPercent); if (src != null)
b.texture = Utils.loadTexture(mTheme.getRelativePathPrefix(), src, b.symbolWidth, b.symbolHeight, b.symbolPercent);
return b.build(); return b.build();
} }