Commit bb97cc19 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Don't try to initialize the devices model with an empty list

parent fb9143a2
......@@ -146,6 +146,10 @@ void DevicesModel::receivedDeviceList(QDBusPendingCallWatcher* watcher)
const QStringList deviceIds = pendingDeviceIds.value();
if (deviceIds.isEmpty())
beginInsertRows(QModelIndex(), 0, deviceIds.count()-1);
Q_FOREACH(const QString& id, deviceIds) {
m_deviceList.append(new DeviceDbusInterface(id, this));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment