aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-08-19 11:55:39 -0700
committerChris Robinson <[email protected]>2021-08-19 11:55:39 -0700
commitb1031459c95486226512ad638195ba087c12c09e (patch)
treec96f72ce3cf1ba6053a9ff9e2d65ec38462f8df4 /alc
parent4b030b7e95bd2c721023eabc6696e239064cb654 (diff)
Don't try to get the stream time if there's no stream
Diffstat (limited to 'alc')
-rw-r--r--alc/backends/pipewire.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index efba0216..e450848b 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -1309,6 +1309,7 @@ ClockLatency PipeWirePlayback::getClockLatency()
* CLOCK_MONOTONIC time closest to when that last tick was played).
*/
pw_time ptime{};
+ if(mStream)
{
MainloopLockGuard _{mLoop};
if(int res{pw_stream_get_time(mStream.get(), &ptime)})