Changeset d17bb63 in subsurface


Ignore:
Timestamp:
Jul 3, 2017, 3:06:20 PM (3 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
252dfaf
Parents:
8467e53
git-author:
Robert C. Helling <helling@…> (07/03/17 14:43:37)
git-committer:
Dirk Hohndel <dirk@…> (07/03/17 15:06:20)
Message:

Don't try to dereference empty product/vendor list

Signed-off-by: Robert C. Helling <helling@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/downloadfromdcthread.cpp

    r0482f05 rd17bb63  
    379379        if (currentVendorText == QObject::tr("Paired Bluetooth Devices")) {
    380380                int i =  productList[currentVendorText].indexOf(currentProductText);
     381                if (i < 0 || btAllDevices.length() <= i)
     382                        return QString();
    381383                QString dcVendor = dc_descriptor_get_vendor(btAllDevices[i].dcDescriptor);
    382384                qDebug() << "getDeviceDescriptorVendor" << dcVendor;
     
    407409        if (currentVendorText == QObject::tr("Paired Bluetooth Devices")) {
    408410                int i =  productList[currentVendorText].indexOf(currentProductText);
     411                if (i >= btAllDevices.length() || i < 0)
     412                        return QString();
    409413                QString dcProduct = dc_descriptor_get_product(btAllDevices[i].dcDescriptor);
    410414                qDebug() << "getDeviceDescriptorProduct" << dcProduct;
Note: See TracChangeset for help on using the changeset viewer.