From 55df70130c08ee2429c470fb57d596a17f1dbf10 Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Thu, 18 Jul 2024 06:35:50 -0500 Subject: [PATCH] Goof-proofing --- firestar/src/main/java/Suggs.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/firestar/src/main/java/Suggs.java b/firestar/src/main/java/Suggs.java index d0784b2..01a13d7 100644 --- a/firestar/src/main/java/Suggs.java +++ b/firestar/src/main/java/Suggs.java @@ -268,6 +268,11 @@ public class Suggs implements ActionListener, ListSelectionListener { } private void save() { + if (tracklist.isEmpty() && sptrack == null && mptrack == null) { + JOptionPane.showMessageDialog(frame, "Please add at least one song to the playlist.", "Error", JOptionPane.ERROR_MESSAGE); + return; + } + frame.setEnabled(false); frame.setAlwaysOnTop(false); Main.deleteDir(new File(System.getProperty("user.home") + "/.firestar/temp/")); // starts with clean temp