Skip to content

Commit 40fa5f9

Browse files
committed
fix editor
1 parent 6b9df70 commit 40fa5f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/team/zxorg/zxnoter/ui_old/editor/MapEditor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,11 +807,15 @@ public MapEditor(Path mapPath, Tab tab) {
807807
HashMap<String, String> metadata = FFmpeg.audioToMetadata(audioFile.toPath());
808808

809809
String title = metadata.get(FFmpeg.AudioMetadataKey.TITLE.getKey());
810+
if (title == null)
811+
title = "";
810812
zxMap.unLocalizedMapInfo.addInfo(ZXMInfo.TitleUnicode, title);
811813
if (Pattern.matches("\\A\\p{ASCII}*\\z", title))
812814
zxMap.unLocalizedMapInfo.addInfo(ZXMInfo.Title, title);
813815

814816
String artist = metadata.get(FFmpeg.AudioMetadataKey.ARTIST.getKey());
817+
if (artist == null)
818+
artist = "";
815819
zxMap.unLocalizedMapInfo.addInfo(ZXMInfo.ArtistUnicode, artist);
816820
if (Pattern.matches("\\A\\p{ASCII}*\\z", artist))
817821
zxMap.unLocalizedMapInfo.addInfo(ZXMInfo.Artist, artist);

0 commit comments

Comments
 (0)