gui/queue: Set gq_queue->gq_search to NULL after freeing

Otherwise we can attempt to free the search text again when the queue is
destroyed.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2016-08-13 08:26:00 -04:00
parent 085701ad9d
commit 004d4578d4
1 changed files with 3 additions and 1 deletions

View File

@ -81,8 +81,10 @@ void __queue_filter(GtkSearchEntry *entry, gpointer data)
if (!gq_queue)
return;
if (gq_queue->gq_search)
if (gq_queue->gq_search) {
g_free(gq_queue->gq_search);
gq_queue->gq_search = NULL;
}
if (strlen(text) > 0) {
gq_queue->gq_visible = filter_search(text);
gq_queue->gq_search = g_strdup(text);