[longomatch] Show an information message when no playlist is loaded



commit 49ef817f875287cfab1be91b81b006ac2054c984
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Nov 25 20:00:44 2012 +0100

    Show an information message when no playlist is loaded

 LongoMatch.Services/Services/PlaylistManager.cs |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.Services/Services/PlaylistManager.cs b/LongoMatch.Services/Services/PlaylistManager.cs
index bcd34f9..5ec1e07 100644
--- a/LongoMatch.Services/Services/PlaylistManager.cs
+++ b/LongoMatch.Services/Services/PlaylistManager.cs
@@ -94,8 +94,12 @@ namespace LongoMatch.Services
 		}
 		
 		private void Add(PlayListPlay plNode) {
-			playlist.Add(plNode);
-			playlistWidget.Add(plNode);
+			if (playlist == null) {
+				guiToolkit.InfoMessage(Catalog.GetString("You have not loaded any playlist yet."));
+			} else {
+				playlist.Add(plNode);
+				playlistWidget.Add(plNode);
+			}
 		}
 		
 		private void LoadPlaylistPlay(PlayListPlay play)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]