From fbe010a3bcb69e86e0a4806071752cce03a9dc79 Mon Sep 17 00:00:00 2001 From: ag2s20150909 Date: Thu, 13 May 2021 11:44:06 +0800 Subject: [PATCH] =?UTF-8?q?resource=E4=B8=BAnull=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../me/ag2s/epublib/domain/TitledResourceReference.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epublib/src/main/java/me/ag2s/epublib/domain/TitledResourceReference.java b/epublib/src/main/java/me/ag2s/epublib/domain/TitledResourceReference.java index cba1ed83f..076b9952b 100644 --- a/epublib/src/main/java/me/ag2s/epublib/domain/TitledResourceReference.java +++ b/epublib/src/main/java/me/ag2s/epublib/domain/TitledResourceReference.java @@ -69,8 +69,11 @@ public class TitledResourceReference extends ResourceReference @Override public Resource getResource() { - //修复getTitle为null的bug - resource.setTitle(title); + //resource为null时不设置标题 + if(this.resource!=null&&this.title!=null){ + resource.setTitle(title); + } + return resource; }