If there is no decklink hardware/driver, the devices list is empty (NULL), so this needs to be checked before iterating over the list.
If there is no decklink hardware/driver, the devices list is empty (NULL), so this needs to be checked before iterating over the list.