From c251811f132a648b42b691b57051e90911a41f69 Mon Sep 17 00:00:00 2001 From: Gireesh Date: Tue, 7 May 2024 00:41:45 +0530 Subject: [PATCH] fixed NPE issue --- src/main/java/com/gmt/gp/services/LibraryService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmt/gp/services/LibraryService.java b/src/main/java/com/gmt/gp/services/LibraryService.java index 96715a0..0dd90a7 100644 --- a/src/main/java/com/gmt/gp/services/LibraryService.java +++ b/src/main/java/com/gmt/gp/services/LibraryService.java @@ -537,7 +537,7 @@ public Library getLibraryFromFile(Tag tag, AudioFile audioF, File mpFile) throws if (!tag.getFirst(FieldKey.COMPOSER).equals("") && tag.getFirst(FieldKey.COMPOSER) != null) { library.setComposer(tag.getFirst(FieldKey.COMPOSER)); } else { - if (!library.getAlbumArtist().equals(GP_CONSTANTS.UNKNOWN_LABEL)) { + if (library.getAlbumArtist()!=null && !library.getAlbumArtist().equals(GP_CONSTANTS.UNKNOWN_LABEL)) { library.setComposer(library.getAlbumArtist()); } else { library.setComposer(GP_CONSTANTS.UNKNOWN_LABEL);