From: Richard Kettlewell Date: Wed, 25 Nov 2009 16:08:02 +0000 (+0000) Subject: Clean up picker list store properly X-Git-Tag: 5.0~45^2~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/a544b1cccd8fcb9f9058aa2519a10f2588ac25f8?hp=53ce677c9e2bd08ab5e78f737226a7aa2ea94d8e Clean up picker list store properly --- diff --git a/disobedience/playlists.c b/disobedience/playlists.c index 7c02702..1333da2 100644 --- a/disobedience/playlists.c +++ b/disobedience/playlists.c @@ -722,6 +722,14 @@ static GtkWidget *playlist_picker_create(void) { return vbox; } +static void playlist_picker_destroy(void) { + playlist_picker_delete_button = NULL; + g_object_unref(playlist_picker_list); + playlist_picker_list = NULL; + playlist_picker_selection = NULL; + playlist_picker_selected = NULL; +} + /* Playlist editor ---------------------------------------------------------- */ static GtkWidget *playlists_editor_create(void) { @@ -1122,6 +1130,7 @@ static gboolean playlist_window_keypress(GtkWidget attribute((unused)) *widget, static void playlist_window_destroyed(GtkWidget attribute((unused)) *widget, GtkWidget **widget_pointer) { destroy_queuelike(&ql_playlist); + playlist_picker_destroy(); *widget_pointer = NULL; }