mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
decklink: Fix crash when probing without driver
If there is no decklink hardware/driver, the devices list is empty (NULL), so this needs to be checked before iterating over the list.
This commit is contained in:
parent
982072ce1d
commit
9f1fbd3649
1 changed files with 4 additions and 0 deletions
|
@ -1586,6 +1586,10 @@ gst_decklink_get_devices (void)
|
|||
|
||||
g_once (&devices_once, init_devices, NULL);
|
||||
|
||||
if (!devices) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < devices->len; i++) {
|
||||
Device *device = (Device *) g_ptr_array_index (devices, i);
|
||||
|
||||
|
|
Loading…
Reference in a new issue