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:
parent
085701ad9d
commit
004d4578d4
|
@ -81,8 +81,10 @@ void __queue_filter(GtkSearchEntry *entry, gpointer data)
|
||||||
|
|
||||||
if (!gq_queue)
|
if (!gq_queue)
|
||||||
return;
|
return;
|
||||||
if (gq_queue->gq_search)
|
if (gq_queue->gq_search) {
|
||||||
g_free(gq_queue->gq_search);
|
g_free(gq_queue->gq_search);
|
||||||
|
gq_queue->gq_search = NULL;
|
||||||
|
}
|
||||||
if (strlen(text) > 0) {
|
if (strlen(text) > 0) {
|
||||||
gq_queue->gq_visible = filter_search(text);
|
gq_queue->gq_visible = filter_search(text);
|
||||||
gq_queue->gq_search = g_strdup(text);
|
gq_queue->gq_search = g_strdup(text);
|
||||||
|
|
Loading…
Reference in New Issue