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:
parent
2c9072314a
commit
30ddb3e1a4
@ -766,10 +766,7 @@ prune_monitors (EnumMonitorData *data)
|
||||
m = g_ptr_array_index (data->monitors, i);
|
||||
|
||||
if (m->remove)
|
||||
{
|
||||
g_ptr_array_remove_index (data->monitors, i);
|
||||
continue;
|
||||
}
|
||||
g_ptr_array_remove_index (data->monitors, i--);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user