summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d8255c)
raw | patch | inline | side by side (parent: 3d8255c)
author | Max Kellermann <max@duempel.org> | |
Sat, 17 Oct 2009 22:30:42 +0000 (00:30 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sat, 17 Oct 2009 22:30:42 +0000 (00:30 +0200) |
We don't need the locale path if we don't print a message.
src/screen_browser.c | patch | blob | history |
diff --git a/src/screen_browser.c b/src/screen_browser.c
index 455053c60a5bcab4e294079642818a01faa74ca1..8802e5f93bb1eab29ed8d8ace445048a8fea495f 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
load_playlist(struct mpdclient *c, const struct mpd_playlist *playlist)
{
struct mpd_connection *connection = mpdclient_get_connection(c);
- char *filename = utf8_to_locale(mpd_playlist_get_path(playlist));
if (mpd_run_load(connection, mpd_playlist_get_path(playlist))) {
+ char *filename = utf8_to_locale(mpd_playlist_get_path(playlist));
screen_status_printf(_("Loading playlist %s..."),
g_basename(filename));
+ g_free(filename);
+
c->events |= MPD_IDLE_QUEUE;
} else
mpdclient_handle_error(c);
- g_free(filename);
return true;
}