player_control: reset pc.error if pc.errored_song is cleared
When the playlist is cleared, pc.errored_song is also cleared. This causes pc_errored_song_uri() to crash, because it assumes that pc.errored_song is set. Reset pc.error to fix that assumption.
This commit is contained in:
		| @@ -49,8 +49,10 @@ void pc_deinit(void) | |||||||
| void | void | ||||||
| pc_song_deleted(const struct song *song) | pc_song_deleted(const struct song *song) | ||||||
| { | { | ||||||
| 	if (pc.errored_song == song) | 	if (pc.errored_song == song) { | ||||||
|  | 		pc.error = PLAYER_ERROR_NOERROR; | ||||||
| 		pc.errored_song = NULL; | 		pc.errored_song = NULL; | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| static void player_command(enum player_command cmd) | static void player_command(enum player_command cmd) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann