Render themes: fallback internal resources, fix #477

This commit is contained in:
Emux
2018-01-09 13:37:56 +02:00
parent 3a596aaf1a
commit 51d4521e6a
2 changed files with 10 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright 2013 Hannes Janetzek
* Copyright 2016-2017 devemux86
* Copyright 2016-2018 devemux86
* Copyright 2017 Longri
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
@@ -166,6 +166,13 @@ public abstract class CanvasAdapter {
inputStream = inputStreamFromAssets(relativePathPrefix, src);
}
// Fallback to internal resources
if (inputStream == null) {
inputStream = inputStreamFromAssets("", src);
if (inputStream != null)
log.info("internal resource: " + src);
}
if (inputStream == null) {
log.error("invalid resource: " + src);
return null;