screen-cast: Clear GError within loop

In order to silence warnings and/or prevent memory leaks.

Fixes: dc2b2e379b (screen-cast-stream: Add explicit modifier support)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3617>
This commit is contained in:
Robert Mader 2024-03-04 14:21:34 +01:00 committed by Marge Bot
parent d7bcab1ee8
commit 572801c02f

View File

@ -153,6 +153,8 @@ meta_screen_cast_get_preferred_modifier (MetaScreenCast *screen_cast,
{ {
int i; int i;
g_clear_error (&error);
for (i = 0; i < modifiers->len; i++) for (i = 0; i < modifiers->len; i++)
{ {
if (g_array_index (modifiers, uint64_t, i) == *preferred_modifier) if (g_array_index (modifiers, uint64_t, i) == *preferred_modifier)