From ffea268d2e0a36fbc7a16f5fe14c7554a2eb56b3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Oct 2013 19:34:59 +0200 Subject: PlayerControl: GetError() returns an Error, not a char* --- src/PlayerCommands.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/PlayerCommands.cxx') diff --git a/src/PlayerCommands.cxx b/src/PlayerCommands.cxx index 8b69c6597..9f427d121 100644 --- a/src/PlayerCommands.cxx +++ b/src/PlayerCommands.cxx @@ -32,8 +32,6 @@ #include "AudioFormat.hxx" #include "ReplayGainConfig.hxx" -#include - #define COMMAND_STATUS_STATE "state" #define COMMAND_STATUS_REPEAT "repeat" #define COMMAND_STATUS_SINGLE "single" @@ -190,13 +188,11 @@ handle_status(Client *client, updateJobId); } - char *error = client->player_control->GetErrorMessage(); - if (error != NULL) { + Error error = client->player_control->LockGetError(); + if (error.IsDefined()) client_printf(client, COMMAND_STATUS_ERROR ": %s\n", - error); - g_free(error); - } + error.GetMessage()); song = playlist.GetNextPosition(); if (song >= 0) { -- cgit v1.2.3