capture-cursor: skip when no read delegate was found

If we were skipping due to no matching read delegate, then
we can just ignore any checks on that frame and move to the
next.
This commit is contained in:
Christian Hergert
2016-10-12 01:35:13 -07:00
parent e22df464fb
commit 4b95b38c0a

View File

@ -80,7 +80,7 @@ sp_capture_cursor_foreach (SpCaptureCursor *self,
{
const SpCaptureFrame *frame;
SpCaptureFrameType type = 0;
ReadDelegate delegate;
ReadDelegate delegate = NULL;
if (!sp_capture_reader_peek_type (self->reader, &type))
return;
@ -130,7 +130,10 @@ sp_capture_cursor_foreach (SpCaptureCursor *self,
break;
}
if (delegate != NULL && NULL == (frame = delegate (self->reader)))
if (delegate == NULL)
continue;
if (NULL == (frame = delegate (self->reader)))
return;
if (self->conditions->len == 0)