diff options
author | Philippe Normand <philn@igalia.com> | 2020-01-05 16:20:18 +0000 |
---|---|---|
committer | Philippe Normand <philn@igalia.com> | 2020-01-05 16:20:18 +0000 |
commit | 9f1fbd36495b7f90d15f7d2dc39fb6e435017573 (patch) | |
tree | 38830f987116eb4ce5ee39e5594c4856052bb74a /sys/decklink | |
parent | 982072ce1d43e2ac966c1b3a6ccc4a9f6f5ea8f9 (diff) | |
download | gstreamer-plugins-bad-9f1fbd36495b7f90d15f7d2dc39fb6e435017573.tar.gz |
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.
Diffstat (limited to 'sys/decklink')
-rw-r--r-- | sys/decklink/gstdecklink.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp index 4978ee40f..82fc8005d 100644 --- a/sys/decklink/gstdecklink.cpp +++ b/sys/decklink/gstdecklink.cpp @@ -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); |