mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 23:20:54 +00:00
libsysprof-profile: check for valid reader before calling cat
This commit is contained in:
@ -158,9 +158,12 @@ sysprof_proxied_instrument_record_fiber (gpointer user_data)
|
|||||||
|
|
||||||
/* Now cat the recording into our writer */
|
/* Now cat the recording into our writer */
|
||||||
writer = _sysprof_recording_writer (record->recording);
|
writer = _sysprof_recording_writer (record->recording);
|
||||||
reader = sysprof_capture_reader_new_from_fd (g_steal_fd (&proxy_fd));
|
|
||||||
sysprof_capture_writer_cat (writer, reader);
|
if ((reader = sysprof_capture_reader_new_from_fd (g_steal_fd (&proxy_fd))))
|
||||||
sysprof_capture_reader_unref (reader);
|
{
|
||||||
|
sysprof_capture_writer_cat (writer, reader);
|
||||||
|
sysprof_capture_reader_unref (reader);
|
||||||
|
}
|
||||||
|
|
||||||
return dex_future_new_for_boolean (TRUE);
|
return dex_future_new_for_boolean (TRUE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user