From 21bcb7008f2c6e17ff9f593da0cd2d1e1d74ccbe Mon Sep 17 00:00:00 2001 From: Alexis Maiquez Date: Sat, 22 Apr 2023 14:02:25 +0200 Subject: [PATCH] Prevent crashing on the PulseAudioPlayingDetector Signed-off-by: Alexis Maiquez --- .../Audio/Drivers/Detectors/CPulseAudioPlayingDetector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WallpaperEngine/Audio/Drivers/Detectors/CPulseAudioPlayingDetector.cpp b/src/WallpaperEngine/Audio/Drivers/Detectors/CPulseAudioPlayingDetector.cpp index fdff128..3019e01 100644 --- a/src/WallpaperEngine/Audio/Drivers/Detectors/CPulseAudioPlayingDetector.cpp +++ b/src/WallpaperEngine/Audio/Drivers/Detectors/CPulseAudioPlayingDetector.cpp @@ -18,7 +18,7 @@ namespace WallpaperEngine::Audio::Drivers::Detectors // get processid const char* value = pa_proplist_gets (info->proplist, PA_PROP_APPLICATION_PROCESS_ID); - if (atoi (value) != getpid () && pa_cvolume_avg (&info->volume) != PA_VOLUME_MUTED) + if (value && atoi (value) != getpid () && pa_cvolume_avg (&info->volume) != PA_VOLUME_MUTED) detector->setIsPlaying (true); }