Commit d08ff485 authored by Colin Walters's avatar Colin Walters
Browse files

gdkwindow: Fix event unref iteration

We were double looping previously which caused a NULL deref.
parent 33fb60e0
......@@ -1815,11 +1815,15 @@ _gdk_event_filter_unref (GdkWindow *window,
else
filters = &window->filters;
for (tmp_list = *filters; tmp_list; tmp_list = tmp_list->next)
tmp_list = *filters;
while (tmp_list)
{
GdkEventFilter *iter_filter = tmp_list->data;
GList *node;
node = tmp_list;
tmp_list = tmp_list->next;
if (iter_filter != filter)
continue;
......@@ -1829,9 +1833,6 @@ _gdk_event_filter_unref (GdkWindow *window,
if (filter->ref_count != 0)
continue;
node = tmp_list;
tmp_list = tmp_list->next;
*filters = g_list_remove_link (*filters, node);
g_free (filter);
g_list_free_1 (node);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment