summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 97e594b)
raw | patch | inline | side by side (parent: 97e594b)
author | Kalle Wallin <kaw@linux.se> | |
Wed, 31 Mar 2004 14:22:55 +0000 (14:22 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Wed, 31 Mar 2004 14:22:55 +0000 (14:22 +0000) |
screen_play.c | patch | blob | history |
diff --git a/screen_play.c b/screen_play.c
index 72c223ed33fbddb49c78a642400dace3758db3f3..151402def525c6ea38c5f4581ed1386b03ea209d 100644 (file)
--- a/screen_play.c
+++ b/screen_play.c
{
case CMD_DELETE:
song = mpc_playlist_get_song(c, screen->playlist->selected);
- file_clear_highlight(c, song);
- mpd_sendDeleteCommand(c->connection, screen->playlist->selected);
- mpd_finishCommand(c->connection);
- screen_status_printf("Removed \'%s\' from playlist!",
- mpc_get_song_name(song));
+ if( song )
+ {
+ file_clear_highlight(c, song);
+ mpd_sendDeleteCommand(c->connection, screen->playlist->selected);
+ mpd_finishCommand(c->connection);
+ screen_status_printf("Removed \'%s\' from playlist!",
+ mpc_get_song_name(song));
+ }
return 1;
case CMD_SAVE_PLAYLIST:
handle_save_playlist(screen, c);