Fixed NPE with dummy doc parts

This commit is contained in:
Georgy Litvinov 2020-11-27 19:16:20 +01:00
parent 2186bf987c
commit 850f92615a

View file

@ -118,7 +118,7 @@ public class DocumentPart {
return false; return false;
} }
public String getName() { public String getName() {
if (metadata != null) { if (metadata != null && order != null) {
String nameFromMeta = metadata.getFirstValue(order,DC_TITLE); String nameFromMeta = metadata.getFirstValue(order,DC_TITLE);
if (!nameFromMeta.isEmpty()) { if (!nameFromMeta.isEmpty()) {
return nameFromMeta; return nameFromMeta;