diff --git a/spa/plugins/bluez5/sco-sink.c b/spa/plugins/bluez5/sco-sink.c index cddbc38bc..0cf41952f 100644 --- a/spa/plugins/bluez5/sco-sink.c +++ b/spa/plugins/bluez5/sco-sink.c @@ -552,7 +552,7 @@ stop: static void sco_on_flush_timeout(struct spa_source *source) { struct impl *this = source->data; - uint64_t exp; + uint64_t exp = 0; int res; spa_log_trace(this->log, "%p: flush on timeout", this); diff --git a/src/tools/pw-cli.c b/src/tools/pw-cli.c index df90a1c41..c8129dbff 100644 --- a/src/tools/pw-cli.c +++ b/src/tools/pw-cli.c @@ -2336,8 +2336,10 @@ int main(int argc, char *argv[]) fprintf(stderr, "Error: \"%s\"\n", error); free(error); } - data.current->prompt_pending = pw_core_sync(data.current->core, 0, 0); - while (!data.quit && data.current) { + if (data.current != NULL) + data.current->prompt_pending = pw_core_sync(data.current->core, 0, 0); + + while (!data.quit && data.current != NULL) { pw_main_loop_run(data.loop); if (!monitor) break;