Fixed possible NULL pointer dereference

This commit is contained in:
Armin Novak 2018-11-13 10:59:41 +01:00
parent b362b61a1a
commit 93eea24120

View File

@ -306,7 +306,7 @@ static void audin_pulse_stream_request_callback(pa_stream* stream, size_t length
AudinPulseDevice* pulse = (AudinPulseDevice*) userdata; AudinPulseDevice* pulse = (AudinPulseDevice*) userdata;
UINT error = CHANNEL_RC_OK; UINT error = CHANNEL_RC_OK;
pa_stream_peek(stream, &data, &length); pa_stream_peek(stream, &data, &length);
error = pulse->receive(&pulse->format, data, length, pulse->user_data); error = IFCALLRESULT(CHANNEL_RC_OK, pulse->receive, &pulse->format, data, length, pulse->user_data);
pa_stream_drop(stream); pa_stream_drop(stream);
if (error && pulse->rdpcontext) if (error && pulse->rdpcontext)