mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-02 17:58:02 +02:00
lua: don't crash if an iterator is NULL
simply behave as if the iterator is valid and has no items in it
This commit is contained in:
parent
9db0e741cd
commit
a604ac4c0c
1 changed files with 1 additions and 1 deletions
|
|
@ -391,7 +391,7 @@ iterator_next (lua_State *L)
|
|||
{
|
||||
WpIterator *it = wplua_checkboxed (L, 1, WP_TYPE_ITERATOR);
|
||||
g_auto (GValue) v = G_VALUE_INIT;
|
||||
if (wp_iterator_next (it, &v)) {
|
||||
if (it && wp_iterator_next (it, &v)) {
|
||||
return wplua_gvalue_to_lua (L, &v);
|
||||
} else {
|
||||
lua_pushnil (L);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue