projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
982072c
)
decklink: Fix crash when probing without driver
author
Philippe Normand
<philn@igalia.com>
Sun, 5 Jan 2020 16:20:18 +0000
(16:20 +0000)
committer
Philippe Normand
<philn@igalia.com>
Sun, 5 Jan 2020 16:20:18 +0000
(16:20 +0000)
If there is no decklink hardware/driver, the devices list is empty (NULL), so
this needs to be checked before iterating over the list.
sys/decklink/gstdecklink.cpp
patch
|
blob
|
history
diff --git
a/sys/decklink/gstdecklink.cpp
b/sys/decklink/gstdecklink.cpp
index
4978ee4
..
82fc800
100644
(file)
--- 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);