diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-03-15 15:12:30 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-16 07:58:20 -0700 |
commit | 2265a27912dca82cd7bbf51dadadf25be5084174 (patch) | |
tree | 662cc7f5a56f189326960d1db0012f5212a2b505 /mobile-widgets/qmlmanager.cpp | |
parent | 0b72495413e8b060b58b96aa6d6a0ce96baa168c (diff) | |
download | subsurface-2265a27912dca82cd7bbf51dadadf25be5084174.tar.gz |
android/usb: better memory management
Instead of relying on the std::vector staying unchanged and not freeing
its members, instead keep a copy of the object in our DCDeviceData class.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 184ce023f..08b674a2a 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -2024,7 +2024,7 @@ void QMLManager::DC_setDevName(const QString& devName) for (unsigned int i = 0; i < androidSerialDevices.size(); i++) { if (androidSerialDevices[i].uiRepresentation == connection) { appendTextToLog(QString("setDevName matches USB device %1").arg(i)); - DCDeviceData::instance()->setUsbDevice((void *)&androidSerialDevices[i]); + DCDeviceData::instance()->setUsbDevice(androidSerialDevices[i]); } } #endif |