avoid nullptr dereference when no devices are found
Differential revision: https://phabricator.kde.org/D13445