fix NPE loading resources

This commit is contained in:
Grahame Grieve 2024-04-22 11:17:06 +10:00
parent 5134aa187c
commit 6bcea37785
1 changed files with 2 additions and 1 deletions

View File

@ -2534,7 +2534,8 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
String[] parts = uri.split("\\/");
if (!Utilities.noString(type) && parts.length == 1) {
if (allResourcesById.containsKey(type)) {
return allResourcesById.get(type).get(parts[0]).getResource();
ResourceProxy res = allResourcesById.get(type).get(parts[0]);
return res == null ? null : res.getResource();
} else {
return null;
}