summaryrefslogtreecommitdiff
path: root/drivers/pulseaudio
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2019-12-28 08:38:29 +0100
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2019-12-28 08:38:29 +0100
commit32eccb87e0ad53504b100f01b5eb779e55e12c9b (patch)
treebc48070099e61f7a5ad3adededbb82158e844108 /drivers/pulseaudio
parent318c69351624f7794c51b5385d252af397c0404a (diff)
Check for null pointer in PulseAudio server info callback.
Diffstat (limited to 'drivers/pulseaudio')
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
index 7ba2175652..b4c595344b 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
@@ -78,6 +78,8 @@ void AudioDriverPulseAudio::pa_source_info_cb(pa_context *c, const pa_source_inf
}
void AudioDriverPulseAudio::pa_server_info_cb(pa_context *c, const pa_server_info *i, void *userdata) {
+
+ ERR_FAIL_COND_MSG(!i, "PulseAudio server info is null.");
AudioDriverPulseAudio *ad = (AudioDriverPulseAudio *)userdata;
ad->capture_default_device = i->default_source_name;