mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-23 12:02:39 -05:00
Fix crash when detecting a player in MTP mode.
Change-Id: I65bf6928584735d6a179750c313fb8e7dcf7add5
This commit is contained in:
parent
c03e665bad
commit
896b771710
2 changed files with 3 additions and 3 deletions
|
|
@ -85,7 +85,6 @@ void Autodetection::detectUsb()
|
|||
// the ini file needs to hold the IDs as hex values.
|
||||
QMap<int, QStringList> usbids = SystemInfo::usbIdMap(SystemInfo::MapDevice);
|
||||
QMap<int, QStringList> usberror = SystemInfo::usbIdMap(SystemInfo::MapError);
|
||||
QMap<int, QStringList> usbincompat = SystemInfo::usbIdMap(SystemInfo::MapIncompatible);
|
||||
|
||||
// usb pid detection
|
||||
QList<uint32_t> attached;
|
||||
|
|
@ -104,7 +103,7 @@ void Autodetection::detectUsb()
|
|||
if(usberror.contains(attached.at(i))) {
|
||||
struct Detected d;
|
||||
d.status = PlayerMtpMode;
|
||||
d.device = usbids.value(attached.at(i)).at(0);
|
||||
d.device = usberror.value(attached.at(i)).at(0);
|
||||
m_detected.append(d);
|
||||
LOG_WARNING() << "[USB] detected problem with player" << d.device;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue