mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
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:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user