mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 02:09:35 +02:00
NPE fixes
This commit is contained in:
parent
281b4367e4
commit
d9437516fd
3 changed files with 16 additions and 9 deletions
|
@ -33,13 +33,16 @@ public class FileFirstLevelTree extends FirstLevelTree {
|
|||
}
|
||||
|
||||
private void addChild(String path, String resourceKey) {
|
||||
final ZLResource resource = Library.resource().getResource(resourceKey);
|
||||
new FileTree(
|
||||
this,
|
||||
ZLFile.createFileByPath(path),
|
||||
resource.getValue(),
|
||||
resource.getResource("summary").getValue()
|
||||
);
|
||||
final ZLFile file = ZLFile.createFileByPath(path);
|
||||
if (file != null) {
|
||||
final ZLResource resource = Library.resource().getResource(resourceKey);
|
||||
new FileTree(
|
||||
this,
|
||||
file,
|
||||
resource.getValue(),
|
||||
resource.getResource("summary").getValue()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue