Fix a crash that occurs when mounting a device with an empty backends container. Fixes issue 2121
This commit is contained in:
parent
8091f9d1cd
commit
3de111d84f
@ -247,7 +247,7 @@ QVariant DeviceManager::data(const QModelIndex& index, int role) const {
|
||||
case Qt::DecorationRole: {
|
||||
QPixmap pixmap = info.icon_.pixmap(kDeviceIconSize);
|
||||
|
||||
if (!info.BestBackend()->lister_) {
|
||||
if (info.backends_.isEmpty() || !info.BestBackend()->lister_) {
|
||||
// Disconnected but remembered
|
||||
QPainter p(&pixmap);
|
||||
p.drawPixmap(kDeviceIconSize - kDeviceIconOverlaySize,
|
||||
|
Loading…
x
Reference in New Issue
Block a user