rtspsrc: Avoid potentially dereferencing NULL pointer

CID 1418986
This commit is contained in:
Thibault Saunier 2017-10-09 14:17:25 +02:00
parent 6cb51bd8cf
commit fb952e3470

View file

@ -5746,7 +5746,8 @@ gst_rtspsrc_send (GstRTSPSrc * src, GstRTSPConnInfo * conninfo,
break; break;
case GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED: case GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED:
GST_INFO_OBJECT (src, "Version %s not supported by the server", GST_INFO_OBJECT (src, "Version %s not supported by the server",
gst_rtsp_version_as_text (versions[version_retry])); versions ? gst_rtsp_version_as_text (versions[version_retry]) :
"unknown");
if (versions && versions[version_retry] != GST_RTSP_VERSION_INVALID) { if (versions && versions[version_retry] != GST_RTSP_VERSION_INVALID) {
GST_INFO_OBJECT (src, "Unsupported version %s => trying %s", GST_INFO_OBJECT (src, "Unsupported version %s => trying %s",
gst_rtsp_version_as_text (request->type_data.request.version), gst_rtsp_version_as_text (request->type_data.request.version),