diff --git a/spa/plugins/libcamera/libcamera-source.cpp b/spa/plugins/libcamera/libcamera-source.cpp index fb986f09f..ee9adc6e2 100644 --- a/spa/plugins/libcamera/libcamera-source.cpp +++ b/spa/plugins/libcamera/libcamera-source.cpp @@ -773,7 +773,7 @@ spa_libcamera_enum_controls(struct impl *impl, struct port *port, int seq, result.next = start; auto it = info.begin(); - for (skip = result.next - offset; skip; skip--) + for (skip = result.next - offset; skip && it != info.end(); skip--) it++; if (false) {