From 62d167b551bab7bc1793b40627925945cdeda558 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 27 Mar 2017 15:10:45 -0400 Subject: audiomixmatrix: Don't crash if matrix is unset Fix a crash ff one set in_channels/out_channels to non-zero, and then get the matrix property. --- gst/audiomixmatrix/gstaudiomixmatrix.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gst') diff --git a/gst/audiomixmatrix/gstaudiomixmatrix.c b/gst/audiomixmatrix/gstaudiomixmatrix.c index ec336337e..6dd59ffd9 100644 --- a/gst/audiomixmatrix/gstaudiomixmatrix.c +++ b/gst/audiomixmatrix/gstaudiomixmatrix.c @@ -356,6 +356,9 @@ gst_audio_mix_matrix_get_property (GObject * object, guint prop_id, case PROP_MATRIX:{ gint in, out; + if (self->matrix == NULL) + break; + for (out = 0; out < self->out_channels; out++) { GValue row = G_VALUE_INIT; g_value_init (&row, GST_TYPE_ARRAY); -- cgit v1.2.1