GDK W32: fix monitor pruning code

Decrement the counter for each removed element, otherwise we skip
one element every time we remove one. Also, no need for continue here.
This commit is contained in:
Руслан Ижбулатов 2017-11-23 07:15:28 +00:00
parent 50bbac6005
commit 323a601123

View File

@ -766,10 +766,7 @@ prune_monitors (EnumMonitorData *data)
m = g_ptr_array_index (data->monitors, i); m = g_ptr_array_index (data->monitors, i);
if (m->remove) if (m->remove)
{ g_ptr_array_remove_index (data->monitors, i--);
g_ptr_array_remove_index (data->monitors, i);
continue;
}
} }
} }