spa-json: fix coverity scan issues

This commit is contained in:
Julian Bouzas
2022-01-25 21:18:16 -05:00
parent 5bef0f240f
commit 46ab414a04
2 changed files with 4 additions and 2 deletions

View File

@@ -145,7 +145,8 @@ push_luajson (lua_State *L, WpSpaJson *json)
key_str = wp_spa_json_parse_string (key);
g_warn_if_fail (key_str);
g_value_unset (&item);
wp_iterator_next (it, &item);
if (!wp_iterator_next (it, &item))
break;
value = g_value_get_boxed (&item);
push_luajson (L, value);
lua_setfield (L, -2, key_str);