omx: Fix crash when setting last error after the ports were freed

This commit is contained in:
Sebastian Dröge 2011-08-10 09:08:00 +02:00
parent 9678efdf88
commit 25fd0594f5

View file

@ -722,7 +722,7 @@ gst_omx_component_set_last_error (GstOMXComponent * comp, OMX_ERRORTYPE err)
* very beginning and never change again until
* component destruction.
*/
n = comp->ports->len;
n = (comp->ports ? comp->ports->len : 0);
for (i = 0; i < n; i++) {
GstOMXPort *tmp = g_ptr_array_index (comp->ports, i);