From 1c08fc18b0907bef79dbcc581014c2260b4b2795 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 10 Jul 2023 13:07:40 -0700 Subject: [PATCH] libsysprof-profile: fix success case --- src/libsysprof-profile/sysprof-recording.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libsysprof-profile/sysprof-recording.c b/src/libsysprof-profile/sysprof-recording.c index c16e1808..656a9982 100644 --- a/src/libsysprof-profile/sysprof-recording.c +++ b/src/libsysprof-profile/sysprof-recording.c @@ -361,7 +361,8 @@ stop_recording: sysprof_capture_writer_flush (self->writer); /* Ignore error types we use to bail out of loops */ - if (!g_error_matches (error, DEX_ERROR, DEX_ERROR_TIMED_OUT) && + if (error != NULL && + !g_error_matches (error, DEX_ERROR, DEX_ERROR_TIMED_OUT) && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) return dex_future_new_for_error (g_steal_pointer (&error));