mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
pulsesink: check pointer before accessing
Move existing check a few lines up, so that we check before accessing fields.
This commit is contained in:
parent
f77650c024
commit
44956f98d7
1 changed files with 3 additions and 3 deletions
|
@ -1718,12 +1718,12 @@ gst_pulsesink_change_title (GstPulseSink * psink, const gchar * t)
|
|||
|
||||
pbuf = GST_PULSERING_BUFFER_CAST (GST_BASE_AUDIO_SINK (psink)->ringbuffer);
|
||||
|
||||
g_free (pbuf->stream_name);
|
||||
pbuf->stream_name = g_strdup (t);
|
||||
|
||||
if (pbuf == NULL || pbuf->stream == NULL)
|
||||
goto no_buffer;
|
||||
|
||||
g_free (pbuf->stream_name);
|
||||
pbuf->stream_name = g_strdup (t);
|
||||
|
||||
if (!(o = pa_stream_set_name (pbuf->stream, pbuf->stream_name, NULL, NULL)))
|
||||
goto name_failed;
|
||||
|
||||
|
|
Loading…
Reference in a new issue