tensormeta: Don't crash on invalid tensor name
It's a valid case to check for an existing tensor. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9411>
This commit is contained in:
parent
d1022fb469
commit
5f52eaae83
@ -236,9 +236,11 @@ gst_tensor_meta_get_typed_tensor (GstTensorMeta * tmeta,
|
||||
|
||||
tensor = gst_tensor_meta_get_by_id (tmeta, tensor_id);
|
||||
|
||||
if (!gst_tensor_check_type (tensor, order, num_dims, data_type, data)) {
|
||||
if (tensor == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!gst_tensor_check_type (tensor, order, num_dims, data_type, data))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return tensor;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user