Fix build under Fedora 19.
Fix crash when listing an unknown device.
This commit is contained in:
parent
82ec2cfde1
commit
0e1002f7dd
@ -92,9 +92,15 @@ ConnectedDeviceInfo ConnectedMtpDevices::GetDeviceInfo(int index)
|
||||
info.bus_location = m_devs[index].bus_location;
|
||||
info.devnum = m_devs[index].devnum;
|
||||
info.device_flags = m_devs[index].device_entry.device_flags;
|
||||
info.product = m_devs[index].device_entry.product;
|
||||
if (m_devs[index].device_entry.product)
|
||||
info.product = m_devs[index].device_entry.product;
|
||||
else
|
||||
info.product = "UNKNOWN";
|
||||
info.product_id = m_devs[index].device_entry.product_id;
|
||||
info.vendor = m_devs[index].device_entry.vendor;
|
||||
if (m_devs[index].device_entry.vendor)
|
||||
info.vendor = m_devs[index].device_entry.vendor;
|
||||
else
|
||||
info.vendor = "UNKNOWN";
|
||||
info.vendor_id = m_devs[index].device_entry.vendor_id;
|
||||
|
||||
return info;
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define JMTPFS_VERSION "0.4"
|
||||
|
||||
|
Reference in New Issue
Block a user