projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f77650c
)
pulsesink: check pointer before accessing
author
Stefan Kost
<ensonic@users.sf.net>
Wed, 3 Jun 2009 15:23:53 +0000
(18:23 +0300)
committer
Stefan Kost
<ensonic@users.sf.net>
Wed, 3 Jun 2009 15:23:53 +0000
(18:23 +0300)
Move existing check a few lines up, so that we check before accessing fields.
ext/pulse/pulsesink.c
patch
|
blob
|
history
diff --git
a/ext/pulse/pulsesink.c
b/ext/pulse/pulsesink.c
index
acb0062
..
36d5b1b
100644
(file)
--- a/
ext/pulse/pulsesink.c
+++ b/
ext/pulse/pulsesink.c
@@
-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;