summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pulsecore/protocol-native.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index a67f9b02..1a112a8d 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -407,6 +407,9 @@ static int record_stream_process_msg(pa_msgobject *o, int code, void*userdata, i
record_stream *s = RECORD_STREAM(o);
record_stream_assert_ref(s);
+ if (!s->connection)
+ return -1;
+
switch (code) {
case RECORD_STREAM_MESSAGE_POST_DATA:
@@ -524,6 +527,9 @@ static int playback_stream_process_msg(pa_msgobject *o, int code, void*userdata,
playback_stream *s = PLAYBACK_STREAM(o);
playback_stream_assert_ref(s);
+ if (!s->connection)
+ return -1;
+
switch (code) {
case PLAYBACK_STREAM_MESSAGE_REQUEST_DATA: {
pa_tagstruct *t;
@@ -689,6 +695,9 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, int6
connection *c = CONNECTION(o);
connection_assert_ref(c);
+ if (!c->protocol)
+ return -1;
+
switch (code) {
case CONNECTION_MESSAGE_REVOKE: